INFOS on the "ViSimulator" N++ plugin
-
Hi, All,
From that discussion, about the ViSumulator plugin
https://notepad-plus-plus.org/community/topic/12147/visimulator-com-has-been-comprimised/3
I decided to have a look to that emulation of the Unix VI editor ! So, below, you’ll find the main pieces of information about the ViSimulator plugin.
After numerous tests, I, particularly, rewrote, in an readable form, the documentation part, which is part of the second post !
LINKS : ¯¯¯¯¯ - New Site : https://web.archive.org/web/20150516065053/http://www.visimulator.com:80/ - Download : https://web.archive.org/web/20150515145616/http://www.visimulator.com/download.html - Help : https://web.archive.org/web/20150523045434/http://www.visimulator.com:80/help.html BEWARE : ¯¯¯¯¯¯ - DO NOT use, anymore, the OLD link : http://www.visimulator.com DESCRIPTION : ¯¯¯¯¯¯¯¯¯¯¯ - ViSimulator is a plug-in for Notepad++, which makes it possible to edit as VI/VIM, within notepad++ - ViSimulator simulates/emulates most frequently-used VI/VIM commands, to provide more powerful editing capability for Notepad++ INSTALLATION : ¯¯¯¯¯¯¯¯¯¯¯¯ - Stop any instance of Notepad++ - Download "ViSimulator.dll" and copy it to "plugins" directory of Notepad++ - Restart Notepad++. => You should find the "ViSimulator" option, below the "Plugins" menu. MD5/SHA1 digests : ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ MD5 : 5a336f7eaf315b7f562b1459c6196778 SHA1: 9ce0425fe02926dcf42461dd976c0c33ad549ead IMPORTANT : ¯¯¯¯¯¯¯¯¯ It works, ONLY, with UNICODE Notepad++ build and was tested, initially, with Notepad++ v6.4.2, v6.5.1, v6.5.3 and v6.5.5. I personally tested it, WITHOUT any problem, with the LAST N++ version v7.5.6 ;-)) HISTORY : ¯¯¯¯¯¯¯ "ViSimulator" v0.4.0.1093 FIXED : 'G' may result in Notepad++ frozen when "Clickable Link" of Notepad++ enabled (enabled in default) To avoid this, there are three methods: - Update ViSimulator to version 0.4.0.1093 or above, in the new version, some work was done to get around the bug of "Clickable Link". - Disable "Clickable Link" option of Notepad++ -- recommended - Click at menu [Settings->Preference] to open the settings dialog, - Then, click at the [Misc] at the bottom of the left list on the dialog just opened, - At last, uncheck "Clickable Link" and save the settings. - Wait for Notepad++ to release version 6.5.5 or above, it will fix this. FIXED : 'H' 'L' 'M' will go to right line in wrap mode. FIXED : 'zt' 'zb' 'z<return>' 'z-' will scroll to right position in wrap mode. FIXED : 'Ctrl-u' 'Ctrl-d' will scroll right count of lines and go to right position in wrap mode. "ViSimulator" v0.4.0.1073 FIXED : In VISUAL mode, when caret moved out of view window, the view does not scroll to make caret visible ADDED : Support text object of [] {} <> "" '' . The following commands can be used in NORMAL mode: ci] ci[ ci} ci{ ci> ci< ci" ci' ca] ca[ ca} ca{ ca> ca< ca" ca' di] di[ di} di{ di> di< di" di' da] da[ da} da{ da> da< da" da' yi] yi[ yi} yi{ yi> yi< yi" yi' ya] ya[ ya} ya{ ya> ya< ya" ya' ADDED : / ? Search FORWARDS and BACKWARDS. You can use REGULAR expression in search command ADDED : HISTORY for command line of EX command and search IMPROVED : Command bar display "ViSimulator" v0.3.6.868 ADDED : Press Ctrl-Alt-Shift-V shortcut to toggle ViSimulator ENABLED or DISABLED ADDED : A simple SETTINGS dialog, you can custom some options "ViSimulator" v0.3.6.838 ADDED : Press shortcut Ctrl-[ will return to NORMAL mode. FIXED : When caret at the END line of document, 'dd' does NOT delete the current line. FIXED : 'f' may failed at some situations FIXED : And many other bugs fixed. "ViSimulator" v0.3.0.659 FIXED : Use Alt+W and other combined keys to active corresponding N++ menu item. Use Alt to active menu, and then enter a character to active N++ corresponding menu item. FIXED : 'O' insert NEW line BEFORE current line when the cursor is at the VERY FIRT line of the file. FIXED : If the COUNT preceding command char is too large, it may lead to Notepad++ not responding for a while. ADDED : Support of commands 'y[H|L|M]' 'd[H|L|M|' 'c[H|L|M]' '>[H|L|M]' '<[H|L|M]' ADDED : Support of commands 'dj' 'dk' 'cj' 'ck' 'yj' 'yk' ADDED : Support of commands 'gU' 'gu' 'gUU' 'guu' 'gu3j' 'gU3k' 'gugg' 'gUgU' 'gugu' 'gUG' 'gU[fFtT]*' etc. CHANGED : 'H' 'L' will not scroll one page up or one page down when the cursor stay at the top line or the bottom line in current view. CHANGED : '##G' '##gg' ( # = any digit ) will move cursor to line ## and scroll line ## to the middle of the view. CHANGED : '##%' will move the cursor to the ## percent line of file and scroll current line to the middle of the view. CHANGED : Disables VISUAL mode temporarily. Copyright © 2014 Simon HE. All rights reserved.
The detail of all commands, of the ViSimulator plugin, are gathered in the next post
Best Regards
guy038
-
Hi, All,
Here are, below, the syntax of all the commands of the ViSimulator plugin :
VI Commands : ¯¯¯¯¯¯¯¯¯¯¯ The commands, CURRENTLY supported, in ViSimulator v0.4.0.1093, are : ¯¯¯¯¯¯¯¯¯¯¯ CURSOR MOTIONS : ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ 0 / Home : Move the cursor to column 1 of CURRENT line ^ / Home : Move the cursor to the FIRST NON-blank character of CURRENT line $ / End : Move the cursor to the END of CURRENT line | : Move the cursor to the [COUNTth] COLUMN ( or FIRST ) of CURRENT line ( NOT with French Keyboard ) - : Move the cursor to the FIRST NON-blank character of the PREVIOUS [count] line + / Enter : Move the cursor to the FIRST NON-blank character of the NEXT [count] line h : Move the cursor to the LEFT [count] column, in CURRENT line l or Space : Move the cursor to the RIGHT [count] column, in CURRENT line k : Move the cursor to the UP [count] line j : Move the cursor to the DOWN [count] line w : Move the cursor to the BEGINNING of NEXT [count] word b : Move the cursor to the BEGINNING of PREVIOUS [count] word e : Move the cursor to the END of NEXT [count] word ge : Move the cursor to the END of PREVIOUS [count] word W : Move the cursor to the BEGINNING of next [count] word, ignoring PUNCTUATION B : Move the cursor to the BEGINNING of previous [count] word, ignoring PUNCTUATION E : Move the cursor to the END of next [count] word, ignoring PUNCTUATION gE : Move the cursor to the END of previous [count] word, ignoring PUNCTUATION f* : Move the cursor to NEXT [count] OCCURRENCE of the character *, in CURRENT line F* : Move the cursor to PREVIOUS [count] OCCURRENCE of the character *, in CURRENT line t* : Move the cursor to just BEFORE the NEXT [count] OCCURRENCE of the character *, in CURRENT line T* : Move the cursor to just AFTER the PREVIOUS [count] OCCURRENCE of the character *, in CURRENT line ; : Repeat last f*/F*/t*/T* search , : Repeat last f*/F*/t*/T* search, in the OPPOSITE direction H : Move the cursor to the FIRST NON-blank character of the [count] line from the TOP of the screen M : Move the cursor to the FIRST NON-blank character of the line at the MIDDLE of the screen L : Move the cursor to the FIRST NON-blank character of the [count] line from the BOTTOM of the screen gg : Move the cursor to the FIRST NON-blank character of the [count] line ( or FIRST ) of the file G : Move the cursor to the FIRST NON-blank character of the [count] line ( or LAST ) of the file Ctrl-D : Scroll file DOWNWARD, [count] HALF page(s), with CURRENT line at the SAME RELATIVE location Ctrl-U : Scroll file UPWARD, [count] HALF page(s), with CURRENT line at the SAME RELATIVE location Ctrl-F : Scroll file DOWNWARD, [count] page(s), with CURRENT line at the SAME RELATIVE location Page Down : Scroll file DOWNWARD, ONE page with CURRENT line at the SAME RELATIVE location Ctrl-B : Scroll file UPWARD, [count] page(s), with CURRENT line at the SAME RELATIVE location Page Up : Scroll file UPWARD, ONE page with CURRENT line at the SAME RELATIVE location Ctrl-E : Scroll file UPWARD, [count] line(s) with CURRENT line INCHANGED Ctrl-Y : Scroll file DOWNWARD, [count] line(s), with CURRENT line UNCHANGED z<Enter> : Scroll CURRENT line at the TOP of the screen and move the cursor to the FIRST NON-blank char. z. : Scroll CURRENT line at the MIDDLE of the screen and move the cursor to the FIRST NON-blank char. z- : Scroll CURRENT line at the BOTTOM of the screen and move the cursor to the FIRST NON-blank char. zt : Scroll CURRENT line at the TOP of the screen zz : Scroll CURRENT line at the MIDDLE of the screen zb : Scroll CURRENT line at the BOTTOM of the screen % : Move to the MATCHING boundary of a BLOCK {[(<...>)]} % : Move the cursor to the count PERCENTAGE of the file * : Select the NEXT occurrence, of the word UNDER the cursor # : Select the PREVIOUS occurrence, of the word UNDER the cursor ( NOT with French Keyboard ) ?Text : Move the cursor, right AFTER the FIRST occurrence of Text, found UPWARD ( REGEX syntax possible ) /Text : Move the cursor, right AFTER the FIRST occurrence of Text, found DOWNWARD ( REGEX syntax possible ) n : Select next SELECTED text, UPWARD, after an INITIAL search ?Text n : Select next SELECTED text, DOWNWARD, after an INITIAL search /Text N : Select next SELECTED text, in the OPPOSITE direction REGEX Syntax : ¯¯¯¯¯¯¯¯¯¯¯¯ Globally, identical to BOOST Regex syntax, in Notepad++. Unfortunately, when matches are CONSECUTIVE, a SINGLE character is ALWAYS skipped, while searching for the NEXT occurrence :-(( Text OBJECTS : ¯¯¯¯¯¯¯¯¯¯¯¯ i( / i) : Select the (..) block, at cursor location, with possible NESTED / JUXTAPOSED (..) blocks, NOT including its BOUNDARIES i[ / i] : Select the [..] block, at cursor location, with possible NESTED / JUXTAPOSED [..] blocks, NOT including its BOUNDARIES i{ / i} : Select the {..} block, at cursor location, with possible NESTED / JUXTAPOSED {..} blocks, NOT including its BOUNDARIES i< / i> : Select the <..> block, at cursor location, with possible NESTED / JUXTAPOSED <..> blocks, NOT including its BOUNDARIES i" : Select the ".." block, at cursor location, WITHOUT INNER ".." blocks inside, NOT including its BOUNDARIES i' : Select the '..' block, at cursor location, WITHOUT INNER '..' blocks inside, NOT including its BOUNDARIES a( / a) : Select the (..) block, at cursor location, with possible NESTED / JUXTAPOSED (..) blocks, including its BOUNDARIES a[ / a] : Select the [..] block, at cursor location, with possible NESTED / JUXTAPOSED [..] blocks, including its BOUNDARIES a{ / a} : Select the {..} block, at cursor location, with possible NESTED / JUXTAPOSED {..} blocks, including its BOUNDARIES a< / a> : Select the <..> block, at cursor location, with possible NESTED / JUXTAPOSED <..> blocks, including its BOUNDARIES a" : Select the ".." block, at cursor location, WITHOUT INNER ".." blocks inside, including its BOUNDARIES a' : Select the '..' block, at cursor location, WITHOUT INNER '..' blocks inside, including its BOUNDARIES dObject : Delete the SELECTION cObject : Delete the SELECTION and enter INPUT mode yObject : Copy the SELECTION in the CLIPBOARD guObject : Change the SELECTION to LOWERCASE (Forms 'i' and 'a' give SAME results !) gUObject : Change the SELECTION to UPPERCASE (Forms 'i' and 'a' give SAME results !) REGULAR commands : ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ Esc : Enter NORMAL mode and delete any SELECTION i : Enter INPUT mode to insert text BEFORE the cursor Inser : Toggle to NORMAL mode OR to INPUT mode to insert text BEFORE the cursor a : Enter INPUT mode to append text AFTER the cursor gi : Enter INPUT mode at the LOCATION which was, LAST time, exited gI : Enter INPUT mode at column ONE, of the CURRENT line I : Enter INPUT mode BEFORE the FIRST NON-blank character, of the CURRENT line A : Enter INPUT mode AFTER the END, of the CURRENT line R : Enter INPUT mode with OVER-TYPE behavior, at CURRENT position of the CURRENT line Tab : Insert a TABULATION character, when INPUT mode Backspace : Delete the PREVIOUS character, when INPUT mode Delete : Delete the CURRENT character, when INPUT mode Delete : Delete the PREVIOUS character, when NORMAL mode Enter : Cut from UNDER the cursor to END of line and paste, at PREVIOUS indentation, on a NEW line, DOWN, when INPUT mode Ctrl-M : Cut from UNDER the cursor to END of line and paste, at column 1, on a NEW line, DOWN, in BOTH modes o : Insert an NEW line BELOW the cursor and enter INPUT mode at INDENT column of that NEW line Ctrl-Alt-Shift : Insert an NEW line BELOW the cursor at column 1 of that NEW line and keep the CURRENT VI mode (N++ Command) + Enter O : Insert an NEW line ABOVE the cursor and enter INPUT mode at column 1 of that NEW line Ctrl-Alt-Shift : Insert an NEW line ABOVE the cursor at column 1 of that NEW line and keep the CURRENT VI mode (N++ Command) + Enter s : Delete [count] character(s) from UNDER the cursor and enter INPUT mode S / cc : Delete [count] line(s) DOWN, from CURRENT line, insert a BLANK line and enter INPUT mode, in CURRENT line cw : Delete [count] NEXT word(s), from CURRENT word, and enter INPUT mode, in CURRENT line cb : Delete [count] PREVIOUS word(s), from CURRENT word, and enter INPUT mode, in CURRENT line C : Remove ALL characters from UNDER the cursor to the END of [count] line(s) and enter INPUT mode D / d$ : Remove ALL characters from UNDER the cursor to the END of [count] line(s) dd : Delete [count] line(s) DOWN, from CURRENT line dw : Delete [count] NEXT word(s), from CURRENT word db : Delete [count] PREVIOUS word(s), from CURRENT word x : Delete [count] character(s) from UNDER the cursor, and copy them to the CLIPBOARD X : Delete [count] character(s) BEFORE the cursor, and copy them to the CLIPBOARD r* : Replace [count] character(s), from UNDER the cursor, with the character * J : Join the CURRENT line with the [count] NEXT line(s), with ONE SPACE character as separator Ctrl-J : Join SELECTED lines, with ONE SPACE character as separator (N++ Command) u : Undo, [count] time(s) the LAST action Ctrl-Z : Undo, ONE time, the LAST action (N++ Command) Ctrl-R : Redo, [count] time(s) the LAST undone action Ctrl-Shift-Z : Redo, ONE time, the LAST undone action (N++ Command) Y / yy : Copy [count] line(s) to the CLIPBOARD p : Paste, [count] time(s), the contents of the CLIPBOARD, AFTER the cursor P : Paste, [count] time(s), the contents of the CLIPBOARD, BEFORE the cursor Ctrl-V : Paste ONE time, the contents of the CLIPBOARD, BEFORE the cursor (N++ Command) v : Toggle to VISUAL mode, with selection of [count] character(s), to the RIGHT, OR to NORMAL mode V : Toggle to VISUAL mode, with selection of [count] line(s), DOWNWARD OR to NORMAL mode ZZ : SAVE and CLOSE current file, WITHOUT any message (same as EX command :wq) . : Repeat, [count] time(s), the LAST text CHANGE command > : Indent ALL the SELECTED line(s) < : UN-indent ALL the SELECTED line(s) >> : Indent [count] line(s) DOWN << : UN-indent [count] line(s) DOWN >{CC} : Indent ALL the line(s) from CURRENT line to CURSOR command line <{CC} : UN-indent ALL the line(s) from CURRENT line to CURSOR command line d{CC} : Delete ALL text from CURRENT position to CURSOR command and copy contents to the CLIPBOARD c{CC} : Delete ALL text from CURRENT position to CURSOR command, copy contents to the CLIPBOARD, and enter INPUT mode y{CC} : Copy ALL text from CURRENT position to CURSOR command and copy contents to the CLIPBOARD where {CC} means any "Cursor Movement Command" ~ : Toggle CASE of CURRENT character to UPPER or LOWER ( NOT with French keyboard ) guu : Change ALL characters of CURRENT line in LOWER case gUU : Change ALL characters of CURRENT line in UPPER case gu{CC} : Change ALL characters, from CURRENT position to CURSOR command, to LOWER case. gU{CC} : Change ALL characters, from CURRENT position to CURSOR command, to UPPER case. EX Commands : ¯¯¯¯¯¯¯¯¯¯¯ : : Enter EX mode :w : SAVE current file Ctrl-S : SAVE current file :q : CLOSE current file, with message if CURRENT file is MODIFIED :bd : CLOSE current file, with message if CURRENT file is MODIFIED Ctrl-W : CLOSE current file, with message if CURRENT file is MODIFIED :wq : SAVE and CLOSE current file, WITHOUT any message (same as VI command ZZ) NOTES : ¯¯¯¯¯ - The LOWER commands g, m, q et z do NOT exist, in ViSimulator - The UPPER commands K, Q, U et Z do NOT exist, in ViSimulator - All CTRL Commands, EXCEPT Ctrl-B, Ctrl-F, Ctrl-U, Ctrl-D, Ctrl-Y, Ctrl-E and Ctrl-R, do NOT exist, in ViSimulator ¯¯¯¯¯¯ ¯¯¯¯¯¯ ¯¯¯¯¯¯ ¯¯¯¯¯¯ ¯¯¯¯¯¯ So, the UNDERLINED N++ ACTIVE shortcuts, in Notepad++, are NOT available, when ViSimulator is ENABLED, in NORMAL mode, from within N++ PARTICULARITIES, with a FRENCH keyboard : ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ - Use the £ key ( instead of : ) to switch to EX mode - Use the : key ( instead of / ) to search FORWARD for [ regex ] string ( Use UP and DOWN arrows to navigate between search HISTORY ) - Use the / key ( instead of ? ) to search BACKWARD for [ regex ] string ( Use UP and DOWN arrows to navigate between search HISTORY ) - The 8 "Text Object" commands i[ , i] , i{ , i} and a[ , a] , a{ , a} do NOT work, because of the MANDATORY use of the ALT key to write the [ , ] , { or } symbols Copyright © 2014 Simon HE. All rights reserved.
Cheers,
guy038