summaryrefslogtreecommitdiff
path: root/bookmarks/vim reference document.txt
diff options
context:
space:
mode:
Diffstat (limited to 'bookmarks/vim reference document.txt')
-rwxr-xr-xbookmarks/vim reference document.txt763
1 files changed, 0 insertions, 763 deletions
diff --git a/bookmarks/vim reference document.txt b/bookmarks/vim reference document.txt
deleted file mode 100755
index 64353db..0000000
--- a/bookmarks/vim reference document.txt
+++ /dev/null
@@ -1,763 +0,0 @@
----
-title: Vim Reference Document
-date: 2011-11-30T17:55:52Z
-source: http://www.jasondrury.com/ref_vim.php#navigate
-tags: Vim
-
----
-
-
-**Last updated:** Apr 27, 2013
-
-
-1. [Introduction][1]
-2. [Navigation][2]
-3. [Inserting][3]
-4. [Deletion][4]
-5. [Yanking/Putting][5]
-6. [Searching][6]
-7. [Substitution][7]
-8. [Changing Case][8]
-9. [Replacement][9]
-10. [Marking][10]
-11. [Spell Checking][11]
-12. [Visual Mode][12]
-13. [Miscellaneous][13]
-14. [Files][14]
-15. [Multiple Windows][15]
-16. [Help][16]
-17. [Keyboard Mappings
-18. [Vimrc Files][17]
-19. [Plugins][18]
-20. [Vim as Python IDE][19]
-][20]
-
-
-_**Introduction**_
-
-I have been using Vi/Vim for about 13 years now. I thought I knew most of what there was to know about Vim until this year when I decided to see what else I could do with Vim and wow, I didn't realize how little I was utilizing it's capabilities. This was primarily as a result of finding an article about using Vim as a Python IDE. I discuss this more in the [plugins][18] section.
-
-This is not an intro to Vim document. It is meant more as a reference document after you learn the basics. There are MANY websites and books available where you can learn vi. Here are one's that I recommend:
-
-1. Execute the command **vimtutor** on Linux for a very good introduction to Vim
-
-
-2. Another two good built-in introduction to Vim documents:  **:help usr_02** and **:help intro** \- run these commands from within Vim. If you never navigated the Vim documentation before, there are some tips that I have [here][16]
-
-
-3. [Learning the vi and Vim Editors][21] \- the best book available on the subject
-
-
-4. [Swaroop CH's Byte of Vim][22] \- a very good introduction (plus more) to Vim. He also has a good intro to Python book if you are interested in that.
-
-This document does not include every single Vim command especially if they are very basic (ie. what the navigating commands "hjkl" do) nor more advanced Vim topics (ie. nothing on scripting at the moment). You can think of it as a Vim cheat sheet or user manual, but I feel it is much more then that which is why I am referring to it as a reference document. I have included the commands/capabilities that I often forget or that I feel may not be as well known to the casual Vim user. Also something that I have not seen on many other Vim related websites, I include the most common commands to the [plugins][18] as well as where to go for additional information on said plugins. I hate having to track down the help for a plugin that I only use occasionally.
-
-**Note1:** some of the commands are in ex mode. Make sure you notice if there is a colon (:) or not before a command. This makes a big difference.
-
-**Note2:** if a letter below is capitalize, then ensure you capitalized it when using it.
-
-**Note3:** below is the environment that I use Vim in. If you use something different, there may be some slight differences in the below commands/plugins:
-
-* Vim version: 7.3.154
-* Terminal: Gnome Terminal 3.0.1
-* Screen version: 4.00.03jw4 (FAU) 2-May-06
-
-If you feel any of the content in this document is wrong or there is something that I should add, I would appreciate it if you would [contact me][23] and let me know. Thanks!
-
-
-[[Table of Contents][24]]
-
-
-
-_**Navigation**_
-
-I use the below scroll commands and record commands constantly. The record commands allow you to record a series of steps and then perform them again later on. I just learned about the move commands and I feel I will be using them more. See **:help motion** for more info on navigation.
-
-Scrolling:
-
-* Forward a full screen: **Ctrl-F**
-* Backward a full screen: **Ctrl-B**
-* Forward a half screen: **Ctrl-D**
-* Backward a half screen: **Ctrl-U**
-* Help:  **:help scrolling**
-Record Commands:
-* To turn recording on: **q&ltname of buffer&gt** \- I use "a, b, c, etc." for the name of my buffers
-* To turn recording off (when you are done entering your commands): **q**
-* To retrieve your buffer: **@&ltname of buffer&gt**
-* See a list of your recorded commands (actually it includes all of your registers):  **:reg**
-* Help:  **:help record** and **:help 10.1**
-Move to
-* Top line of screen: **H**
-* Middle line of screen: **M**
-* Last line of screen: **L**
-* 5th line after the top line of screen: **5H**
-* 5th line after the middle line of screen: **5M**
-* 5th line before the last line of screen: **5L**
-* First character of the next line: **+**
-* First character of the previous line: **-**
-* First nonblank character on the current line: **^**
-* Beginning of sentence: **(**
-* Beginning of next sentence: **)**
-* Beginning of paragraph: **{**
-* Beginning of next paragraph: **}**
-* 5th line of the file: **5G**
-* Last line of the file: **G**
-* First line of the file: **gg**
-* Return to the previous location you where just at: **``**
-* Help:  **:help object-motions** and **:help various-motions**
-In ex mode (when you type a colon ":" then a command), the following are shortcuts:
-* Current line (not necessary to include the period "." It is assumed by default):  **:.**
-* Last line:  **$** Every line:  **%**
-* Next 10 things (things can be words, lines, etc and + means one, ++ means two, etc):  **+10**
-* Previous 10 things:  **-10**
-* Move lines 25 to the end of the file 5 lines above current line:  **:25,$m.-5**
-* Display line numbers from the current line to the next 10 lines:.  **,+10#**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Inserting**_
-
-* Append at the end of the word: **ea**
-* Append at the beginning of a sentence: **Shift-I**
-* Insert the character above: **Ctrl-Y**
-* Insert text of file at the current cursor position:  **:r file**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Deletion**_
-
-* Delete from the cursor to the end of the line: **D**
-* Delete from the cursor to "pattern" going backwards: **d?pattern**
-* Delete from the cursor to "pattern" going forward: **d/pattern** or **:/pattern/d**
-* Delete the line below the line containing pattern:  **:/pattern/+1d** \- you can leave off the 1 because 1 is assumed by default but I find it clearer to keep it
-* Delete from line containing pattern1 to line containing pattern2:  **:/pattern1/,/pattern2/d**
-* Delete from the cursor to top of screen: **dH** middle of screen: **dM** and bottom of screen: **dL**
-* Move the txt from current line to 1st line containing pattern and move to line after line 10:  **:.,/pattern/m10**
-* Delete the next three lines and place into buffer named "b": **"b3dd**
-* Put the contents of buffer named "b" after the cursor: **"bp**
-* Delete lines 1-20:  **:1,20d**
-* Delete from current line to end of file: **:.,$d**
-* Delete all lines in file:  **:%d**
-* Go through your deletion buffer: **"1pu.u.u** \- the "u" undoes the previous deletion and "." puts the next one
-
-
-[[Table of Contents][24]]
-
-
-
-_**Yanking/Putting**_
-
-Yanking and putting text is a very useful feature
-
-* Put before cursor: **P**
-* Put after cursor: **p**
-* Yank lines 1-10:  **:1,10y**
-* Put the links you just yanked:  **:pu**
-* Yank from the cursor to pattern going forward: **y/pattern**
-* Yank from the cursor to pattern going backwards: **y?pattern**
-* Yank current line into buffer "a": **"ayy**
-* Put contents of buffer "a" after cursor: **"ap**
-* Yank the next 5 lines into buffer "b": **"b5yy**
-* Put contents of buffer "b" before cursor: **"bp**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Searching**_
-
-* Search for string within a word boundary: **/\&ltstring\&gt/**
-* To find the next occurrence of a word (while you are positioned over it): * and # (backwards)
-* To search for a word in reverse: **N**
-* Turn on search highlighting:  **:set hlsearch **
-* Turn off search highlighting:  **:set nohlsearch **
-* Do not ignore case:  **:set smartcase **
-* Ignore case: **:set ic**
-* The characters **.*[]^%/\?~$** have special meaning. If you want to use them in a search you must put a backslash (\\) in front of them.
-* Go to first space character: **/\s**
-* Do not start search from the top once it hits bottom:  **:set nowrapscan**
-* Print all lines that contain "pattern":  **:g/pattern**
-* Print all lines that do NOT contain "pattern":  **:g!/pattern/** or **:v/pattern**
-* Get a list of your search history:  **q/** \- use Ctrl-c twice to exit this mode
-Help:  **:help search** and **:help usr_27**
-
-Note, also look at the [substitution][7] section for more string matching options that you can also use when searching
-
-
-[[Table of Contents][24]]
-
-
-
-_**Substitution**_
-
-Vim's substitution capabilities are one of it's most powerful features. A few helpful notes before jumping into the examples:
-
-1. Many examples have the percent sign character '%' which means perform the change on the entire file. If this is not included the substitution works only on the current line (or a range of lines if you specify that).
-
-
-2. The caret character '^' matches at the beginning of a line and the dollar sign '$' at the end
-
-Now for some examples:
-
-* Substitute y for every occurrence x in lines 1 through last:  **:1,$ s/x/y/g**
-* Substitute y for every occurrence x in lines 50-75 through last:  **:50,75 s/x/y/g**
-* To replace all occurrences of "hi" with "bye" in the current line:  **:% s/hi/bye/g**
-* Replace all occurrences of "ACCEPT" with "DENY -i eth1":
-  **:% s/ACCEPT/DENY -i eth1/g**
-* To replace the text "red" with "blue", but only when red is the first word on the line:  **:s/^red/blue/**
-* Remove anything that has the word "line" follow by a space, follow by one or more digits:  **:% s/line \d* //g**
-* Remove a forward slash at the end of a line (notice you must backslash the forward slash): **0,$ s/\/$/**
-* Substitute everything that has ".20" in it with ".200" on just line 16:
-  **:16 s/.20\>/.200/g**
-* Use "c" to be prompted to replace each substitution:  **:% s/hi/bye/c**
-* Use "i" for for the match to be case insensitive: **:% s/hi/bye/i**
-* Use "I" (uppercase "i") for for the match to be case sensitive (which is the default setting but you may want to use this if you set case insenstive searches in your .vimrc file "set ignorecase"): **:% s/hi/bye/I**
-
-One of the most powerful features of substitution is being able to use regular expressions. Below are some examples I have used:
-
-* Remove all word () and underscore characters (_). Note to match two different things, you need to use this format \\(pattern1\|pattern2\\):  **:% s/\\(\|_\\)//g**
-* Remove all blank lines (regardless if they have any spaces "\s" and/or newlines " "): **:% s/\\(^\\( \|\s\\)*\\)//g**
-* Delete anything that says "port <any amount of numbers>/<tcp or udp>" (example: port 443/tcp or port 161/udp) **:% s/port\s\d*\/\\(tcp\|udp\\)//**
-
-You can find more examples here: <http://vimregex.com/#substitute>
-Help:  **:help substitute**, **:help 10.2**, or [Substitution on vimdoc][25]
-
-
-[[Table of Contents][24]]
-
-
-
-_**Changing Case**_
-
-This sections shows the different options to change the case of characters and words
-
-
-* Use **g~** followed by any movement command to change the case to the opposite of what it currently is (aka "toggle"). Here are some examples:
- * To the end of the line: **g~$** (ie. "GoodBye" will change to "gOODbYE"
- * The next three lines: **g~2j**
- * The next three characters: **g~3l**
-* Use **gU** followed by any movement command to change any lowercase characters to uppercase. (ie. **gUw** will change "GoodBye" to "GOODBYE")
-* Use **gu** followed by any movement command to change any uppercase characters to lowercase. (ie. **guw** will change "GoodBye" to "goodbye")
-* Toggle the case of the current line: **g~~**
-* Uppercase the current line: **gUU**
-* Lowercase the current line: **guu**
-* Lowercase an entire file: **:%s/.*/\L&/** or from the first line: **guG**
-* Uppercase an entire file: **:%s/.*/\U&/** or from the first line: **gUG**
-
-Help: [Switching the case of characters][26]
-
-
-[[Table of Contents][24]]
-
-
-
-_**Replacement**_
-
-This sections deals with word and line replacement
-
-Change:
-
-* To the end of the line: **c$** or just **C**
-* To the beginning of the line: **c^** or **c0**
-* Just a single word: **cw**
-* The next two words: **2cw**
-* The previous word: **cb**
-* The previous two words: **2cb**
-* An entire line: **cc** or **S**
-* From the cursor to the top of the screen: **cH** middle of screen: **cM** and bottom of screen: **dL**
-* From the cursor to "pattern" going forward: **c/pattern**
-* From the cursor to "pattern" going backwards: **c?pattern**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Marking**_
-
-You can place an invisible marker in your file that you can reference later. Note, these are deleted once you close the file.
-
-* Leave a mark named "a" where the cursor is currently:  **ma**
-* Move to the mark "a":  **`a**
-* Move to the beginning of the line where the mark "a" is located:  **'a**
-* Go to the previous location:  **Ctrl-o**
-* Go to the next location:  **Ctrl-i**
-Help:  **:help mark-motions**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Spell Checking**_
-
-Yes, that's right, Vim has spell checking and it rocks!
-
-Here are the most useful commands:
-
-
-* Enable spell checking:  **:set spell spelllang=en_us**
-* Disable spell checking:  **:set nospell**
-* For the misspelled word, suggest a replacement:  **z=**
-* Repeat the replacement for the misspelled word for all matches:  **:spellr**
-* Move to the next misspelled word:  **]s**
-* Move to the next misspelled word, going backwards:  **[s**
-* Add word to dictionary:  **zg**
-* Remove a word from the dictionary: **zug**
-If you are using my advanced .vimrc file, I mapped the following keys:
-* Enable spell checking: **&ltF5&gt**
-* Disable spell checking: **&ltF6&gt**
-Help:  **:help spell**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Visual Mode**_
-
-I just started using visual mode, but I really like it for certain things. My favorite use of it so far is to quickly indent or add comments to a block of code.
-
-**Note:** to get out of any visual mode, hit the &ltESC&gt key and wait about 3 seconds.
-
-* Start visual mode:  **v** \- this works on a character basis, but when you move down it selects the entire line
-* Start visual mode:  **V** \- this works on a line basis (
-* Start block visual mode:  **Ctrl-v** \- this is the most useful mode. It allows you to highlight just certain parts of the text using either the arrow keys or navigation keys
-* Change while in block visual mode:  **c** \- this is used the same way as insert above, but you are changing the text you have highlighted. Just like insert, the changes do not reflect for all lines (just the first line) until you hit ESC key
-* These are the options you have with highlighted text:
- * Change the case of characters:   **~** (tilde symbol)
- * Indent right:   **>** (greater then symbol)
- * Indent left (un-indent):   ** (less then symbol)**
- * Change text: **c** \- in block mode, the same things applies as the note I include below for insert mode
- * Yank text: **y**
- * Delete/Cut text: **d** (To paste text move cursor to desired location and use **P** to put text above the cursor or **p** for below
-
-For more examples, see:  **:help text-objects**
-
-
-* Another very useful feature is the ability to insert while in _block_ visual mode:  **I**
-Note: when inserting, what you are inserting will ONLY appear on the first line, but when you are done and hit the &ltESC&gt key about 3 seconds later it should put what you inserted on every line you had selected
-* Select the entire file (usefull when copying and pasting): **ggvG**
-* Select from where the cursor is currently positioned to the end of file: **vG**
-* Exit out of visual mode: **&ltEsc&gt** key
-Help:  **:help visual-mode**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Miscellaneous**_
-
-* You can create abbrevations. For exampele **:ab us United States** will allow you to just type "us" and it will be replaced with "United States." To disable the abbrevation type **:unab us**
-* List all abbrevations **:ab**
-* Enable the ability to use your mouse in xterm:  **:set mouse=a** \- note, this is enabled by default in my advanced vimrc file and you can toggle it on/off with Ctrl-m. The only reason I ever disable it is when I need to highlight text for copying and pasting. With mouse support enabled Vim goes into visual mode when you highlight text.
-* Vim supports tab completion! Look at **:help ins-completion** and the "SuperTab" plugin in the [plugins section][18]
-* You can view your command line history with:  **q:** (when in this window, press Ctrl-c twice to exit)
-* In ex mode you can use a pipe to combine commands (just like a unix shell). The following commands will yank lines 2-4, move to line 7 and put the previous contents of lines 2-4, move to line 4, delete it, and the write the file:  **:2,4y | 7 | pu | 4 | d | w**
-* View the contents of your registers/buffers:  **:reg**
-* To repeat a colon command:  **@:** and to repeat it again:  **@@**
-* To view current options:  **:set**
-* You can also check any individual setting  **:verbose set ai?** \- verbose is optional, but it provides additional info (sometimes)
-* To add a number to each line:  **:set nu**
-* To turn off numbers:  **:set nonu** \- *note: if you are using my advanced .vimrc file, you can use &ltF2&gt to toggle line numbers on and off
-* To temporarily disable any option:  **:set no<option>** (no space between "no" and the option)
-* To turn off color:  **:syntax off**
-* Check the version of vim and what was compiled in:  **:ver**
-* Execute the current file:  **E** or **!`pwd`/%**
-* Execute the current file with an argument: **!`pwd`/% arg1**
-* Execute the current file with an argument and piping to more: **!`pwd`/% arg1 | more**
-* Temporarily show the line numbers for lines 1-20:  1,20#
-* Move lines 1-20 to line 51:  **:1,20m50**
-* Copy lines 1-20 to line 51:  **:1,20c50**
-* Print the total number of lines of the current file:  **:=**
-* Gives you a status of:  current name of file, your current line number, and percentage of where you are in the file: **Ctrl-G**
-* Some of my favorite [Vim links][27]
-
-
-[[Table of Contents][24]]
-
-
-
-_**Files**_
-
-Here are useful commands when working with files. Note some of these commands talk about editing multiple files at the same time. This is similar, but different then working with [multiple windows][15]. Both of them allow you to yank, put, delete, copy between files
-
-* To open up files in other directories, use the full or relative path:  **:e ../file1** or **:e /home/jdoe/file1**
-* You can also change to a directory and then open it:  **:cd /home/jdoe**
-* Write the file and quit:  **:x**
-* Fast way to close and save a file (equivalent to :wq!):  **ZZ** \- this is two capital z's
-* Save lines 100 to end of file1 to file2:  **:100,$w file2**
-* Save lines from 1-50 of file1 to file2  :**1,50w file2**
-and line 200 to end of file to file3:   **:200,$w file3**
-* To undo all of the edits you made in your session:  **:e!**
-* Open "file" at pattern:  **vi +/pattern file**
-* Open "file" in read-only mode:  **vi -R file**
-* Read in file2 and place it:
- * below the cursor:  **:r file2**
- * after line 50:  **:50r file2**
- * at end of the current file:  **:$r file2**
- * at the beginning of the current file:  **:0r file2**
-* Here are the commands to edit more then one file at a time:
- * From the command line, edit two files:  **vi file1 file2**
- * Go to the next file:  **:n**
- * Go back one file:  **:N**
- * Go back to first file:  **:re** \- short for [re]wind
- * See all the files open and which one you are currently editing:  **:ar** \- short for [ar]gs
- * Open a new file named file2:  **:e file2**
- * Move between files:  **Ctrl-^** \- that is the carrot (^) symbol
- * The percent symbol **%** is used to represent the current file and **#** the other file (think of them as shortcuts). For example if you created file1 then did **:e file2** then go back to file1, file1 would be % and file2 would be # so if you wanted to read file2 into file1 you would do(there is a space between the r and #):  **:r #**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Multiple Windows**_
-
-One of the best/coolest/most useful features of Vim is the ability to work with multiple windows in a single Vim session. Here are some of the most useful commands.
-
-* Edit a file in a new buffer(window):  **:e filename**
-* Go to next buffer:  **:bn**
-* Go to previous buffer:  **:bp**
-* Delete a buffer (close a file):  **:bd**
-* Open a new blank file in a new buffer and split window (horizontally by default):  
-**Ctrl-w,s** or **:sp** \- *Note: you can supply a filename to open that file in the new window
-* Switch between windows:  **Ctrl-w,w** \- *Note: if you are using my advanced .vimrc file, you can use Ctrl-h,j,k,l (navigation keys) to switch between windows. They work just like the navigation keys (ie Ctrl-l to go the left window, etc).
-* Quit a window:  **Ctrl-w,q**
-* Split windows vertically:  **Ctrl-w,v** or **:vsp**
-* Switch/rotate the position of the windows:  **ctrl-w,r**
-* Make current window larger:  **Ctrl-w,+**
-* Make current window smaller:  **Ctrl-w,-**
-* Make windows equal size:  **Ctrl-w,=**
-* Make current window 10 lines bigger:  **:res +10** \- this stands for [res]ize
-* Make current window 5 lines smaller:  **:res -5**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Help**_
-
-Vim has very good built-in documentation, but it can be a bit difficult to navigate. Here are some tips to help:
-
-* Start help:  **:help** \- you can also shorten this to **:h**
-* There is a html version of the help if you like that sort of thing: [Vim Help Online][28]
-* View the user manual:  **:help user-manual**
-* To jump to a subject within vim help (subjects are between |bars|):  **Ctrl-]** \- *note: if you enabled mouse support (see the first tip in [miscellaneous][13] you can go to the subject by double clicking on it with your mouse
-* To go previous subject:  **Ctrl-t**
-* Search all of help for "pattern":  **:helpgrep pattern** and use **:cn** to go to the next match and **:cp** for the previous one. Use **:clist** to see all matches in help.
-* To go to a specific section of help:  **:help 10.2** \- this will go to section 2 "Substitution" of chapter 10 of the user manual
-* Help's help (yes Vim's help has a help manual! You know you are dealing with a powerful piece of software when this happens): **:help help**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Keyboard Mappings**_
-
-In Vim you use keyboard mappings to create keyboard shortcuts. Many people like to map the function keys (F1-F12). Mappings are an extremely useful feature, but the syntax of defining mappings is a bit complicated. Hopefully this section will clarify mappings for you and allow you to create some of your own to do what Vim does best, save you time.
-
-To understand Vim keyboard mappings, you have to know the different Vim modes, which are the following:
-
-* Normal: when you first edit a file (that is if you start vi without any command line options)
-* Visual: when using any of the [visual commands][12]
-* Operator-pending: after you type an operator command (ie. d or y) but before typing the next command (such as w)
-* Insert: anytime you are inserting text (i, s, or c)
-* Command-line: when you are in ex mode (by typing a colon ":") or search mode (by typing a forward-slash "/")
-Now that you understand the different modes, it should be clear what the different mapping commands do:
-* map - Normal, Visual, Operator-pending
-* nmap - Normal
-* vmap - Visual
-* omap - Operator-pending
-* map! - Insert & Command-line
-* imap - Insert
-* cmap - Command-line
-You also need to understand the "noremap" command. This basically tells Vim not to look for another keyboard mapping after loading the current one. This prevents mappings from conflicting with eachother. Each mode has their own version:
-* noremap - Normal, Visual and Operator-pending
-* vnoremap - Visual
-* nnoremap - Normal
-* onoremap - Operator-pending
-* noremap! - Insert and Command-line
-* inoremap - Insert
-* cnoremap - Command-line
-When defining keyboard mappings, you need to know how these common keyboard keys are represented:
-* Ctrl-x: **&ltC-x&gt**
-* Shift-x: **&ltS-x&gt**
-* Alt-x: **&ltA-x&gt**
-* All of the following are valid for the enter key: **&ltCR&gt, &ltEnter&gt, or &ltReturn&gt** \- although &ltCR&gt is used the most
-It is always good to learn from examples. I took the one from Vim's manual and expanded what it does:
-
-**:map &ltF2&gt GoDate: &ltEsc&gt:read !date&ltCR&gtkJ**
-
-This will map the &ltF2&gt key (in normal, visual, and operator-pending mode) to do the following:
-
-* Go to the bottom of the file: **G**
-* Open a new line below the cursor and enter insert mode: **o**
-* Write the word "Date:"  **Date:**
-* Exit insert mode: **&ltEsc&gt**
-* Read in the date command and follow it with a carriage return:  **:read !date&ltCR&gt** or **:r !date**
-* Move up one line and join the two lines together: **kj**
-For additional help I recommend:  **:help usr_40**
-
-
-[[Table of Contents][24]]
-
-
-
-_**Vimrc Files**_
-
-Here are my two [Vimrc files][29]. The basic one is the one that I used for almost 10 years, but as I mentioned in the [introduction][1] this past year I set out to see what I was missing and if you compare the two files you will see it was substantial! Both files are commented so they should be pretty much self explanatory.
-
-Here are the two files:
-
-
-[[Table of Contents][24]]
-
-
-
-_**Plugins**_
-
-These are the plugins that I have installed. They are meant for programmers, but I believe any Vim poweruser will find the majority of them useful. These plugins are all included in my advance vimrc file [above][17]. I list the most common commands for each plugin as well as how to get additional help. This is something I have found lacking in other people's discussion of Vim plugins. Sure you can read the documentation, but I find it handy to have a reference for the most used commands and how to get additional help if needed.
-
-*Note1: I have another section specifically for Python plugins [below][19]
-
-*Note2: any where below that has **:help** you can shorten it to **:h**
-
-* [vim-debug][30] \- an integrated debugging environment. Here are some useful links for this plugin:
- * [How to install][31] \- you need python-pip installed (apt-get install python-pip)
- * [Usage][32] \- the usage instructions on my Python reference page
-
-
-* [snipMate][33] \- implements [TextMate's][34] snippets features
-
-Usage: you can find a list of snippets (and add your own) in ~/.vim/snippets directory. The default key for snipMate is the &ltTab&gt but this is already being used by Pydiction so I remapped it to &ltCtrl&gt-j to complete the snippet and &ltCtrl&gt-k to list available snippets. You can change this in the ~/.vim/after/plugin/snipMate.vim file. Do a ":help snipMate" and a search on "remap" to see which entries need to be modified. To use snipMate, just type the snippet then type &ltCtrl&gt-j to complete it
-
-Here are some useful python one's:
-
- * #! - /usr/bin/python
- * wh - while loop
- * fr - for loop
- * cl - new class
-
-Help:  **:help snipMate**
-* [NERD tree][35] \- explore your file system, in the form of a "tree"
-
-Usage:
-
- * Open NERD tree in the current directory that you are in: **:NERDTree**
- * Open NERD tree in the /home/jdoe directory: **:NERDTree /home/jdoe**
-
-Help:  **:help NERD_tree** Also, while in the NERD tree window, type a question mark "?" to bring up the help options
-* [Supertab][36] \- tab completion on steroids. Allows you to choose your tab completion type (ie. dictionary, file names, tags, etc)
-
-Usage:
-
- * Begin a tab completion forward: **&lttab&gt**
- * Begin a tab completion going backwards through the list: **&ltShift-Tab&gt**
- * Switch the type of tab completion to use: **:SuperTabHelp** \- Note, if you are using my advance vimrc file, SuperTab has "context" based tab completion enabled. This means SuperTab will pick the appropriate type of tab completion (spelling, file names, dictionary, etc.) based on the context of the text.
-
-Help:  **:help supertab**
-* [Surround][37] \- this plugin deals with adding, deleting, and changing parentheses, quotes, and HTML tags
-
-Usage:
-
- * Remove quotes: **ds"** \- the cursor has to be within the quotes
- * Replace quotes with &ltq&gt html tag: **cs"&ltq&gt** \- the cursor has to be within the quotes
- * Replace square brackets with parentheses: **cs])** \- the cursor has to be within the square brackets
- * Add double quotes to the word dog: **vlls"** \- the cursor has to be at the letter 'd' in dog
-
-Help:  **:help surround**
-* [Taglist][38] \- a source code browser plugin. Makes it easy to browse through code. This is the highest rated and most downloaded Vim plugin. Note, you need to have [ctags][39] installed (apt-get install exuberant-ctags).
-
-Usage: open/close the taglist menu: **:TlistToggle** \- if you are using my advanced vimrc file, I mapped this to the &ltCtrl-y&gt key. To jump to a tag, double click on it (if mouse support is enabled) or put the cursor on it and hit enter. To move between the Taglist menu and the file you are working with, use &ltCtrl-L&gt and &ltCtrl-H&gt
-
-Help:  **:help taglist.txt**
-
-* [MiniBufferExplorer][40] \- this is a very useful plugin. It gives you a mini explorer window for your file buffers.
-
-Usage: this plugin is turned on automatically when you are using buffers (ie. editing more then one file at a a time). You will see a list of the files in your buffer at the top of the screen. Double click with your mouse (if it's enabled) to switch between buffers. If your mouse is not enabled, use &ltCtrl-k&gt to move the cursor to this menu and then &ltTab&gt between each file to go forward and **Shift-Tab** to go backwards. Also the commands that I have listed for [multiple windows][15] are used with this plugin.
-
-* [Command-T][41] \- a file explorer for quickly opening any file on your system via Vim. Note, you need to have a version of Vim that has been compiled with Ruby support. If you are running a flavor of Ubuntu (including Mint), then it probably does not have this. You can check with the following command: **vim --version | grep ruby** and if you see "+ruby" then it _does_ have Ruby support. On Ubuntu/Mint you can install vim-nox which has Ruby support (apt-get install vim-nox). I did this and did not notice any difference between it and the version that came installed with Mint, so I would safe it is safe for you to do this as well. Command-T is a very good useful/plugin and I feel it is worth the small amount of extra trouble.
-
-Usage:
-
- * Launch Command-T: **:CommandT** or if you are using my advanced vimrc file: **Shift-t**. Begin typing the file you are looking for and the list will narrow (note, when you are typing it uses the file OR directory name). If you want to open the file, hit Enter
- * Command-T will search the current directory and all sub directories. If you want to change your parent directory, then do: **:cd /parent_dir** first
- * If you simply just type the name of the file, sometimes you will not get the match you where expecting especially if it's a common name. To remediate this, type just a few letters of each directory name in the path and then the filename and Command-T will most likely find the correct file. For example, say we have the file test.py in the directory /home/jdoe/python/test/dir/test.py and you are in the /home/jdoe directory, in Command-T all you should need to type is **pytedite** (the first two characters of each directory and of test.py) for it to choose the correct file. Depending how many directories and files you have with similar names, you may even be able to just type **ptdt** (the first character of each directory and of test.py).
- * Select next file in the file listing: **Ctrl-j**
- * Select previous file in the file listing: **Ctrl-k**
- * Open the file in a new vertical split window: **Ctrl-v**
- * Exit the Command-T file menu: **Esc**
-
-Help:  **:help command-t**
-* [Ack][42] \- [ack][43] is a faster replacement for grep which also allows you to use Perl's regex engine (very handy). This plugin brings ack's capabilities to Vim. You need to have ack installed (apt-get install ack-grep). I have been using ack and I like it better then grep.
-* [Gundo][44] \- this is another very useful plugin. It allows you to see Vim's undo list in a meaningful way. If you every tried to use the comical :undolist command, then you will love this plugin.
-
-Usage:
-
-
- * To toggle Gundo on and off: **:GundoToggle** \- I mapped this to **Ctrl-a** in my advanced vimrc file
- * When you open Gundo, your current position is the @ symbol. You will see the preview window, that shows what has changed, at the bottom
- * Use the navigation keys **j & k** to move up and down the tree
- * Move to the bottom of the menu with **G** and to the top with **gg**
- * See the difference between the current and selected states: **p**
- * Revert to the selected version of the file: **&ltReturn&gt**
-
-Help:  **:help gundo**
-* You can find many more Vim scripts [here ][45] which is an ordered list of Vim scripts based on their favorable rating and downloads. If you have a favorite plugin that I do not have here, [please let me know][23]. I am always looking for good Vim plugins.
-
-
-[[Table of Contents][24]]
-
-
-
-_**Vim as Python IDE**_
-
-I use Vim as my Python IDE. I got the idea from [this article][46] among a few others. The plugins that I [list above][18] provide many functions of an IDE that can be used in any programming language. Below are a few other plugins that are installed which are Python specific. If you use Vim as your Python IDE and find a plugin very useful that I do not have below, I would appreciate it if you would [contact me][23] and let me know. Thanks!
-
-* [Pydiction][47] \- allows you to Tab-complete Python code in Vim
-Usage: just begin typing some python code and hit tab before entering any whitespace and there will be a popup menu with the available options
-* [python_fold][48] \- is used to fold/unfold Python code.
-Usage:
- * Fold/unfold a single section: **f**
- * Fold/unfold ALL folds in the file: **F**
- * Unfold all folds under the cursor: **cO** \- that is a capital letter o
- * Move forward through the folds (does not matter if they are open or not): **zj**
- * Move backwards through the folds (does not matter if they are open or not): **zk**
-
-Help:  **:help fold** and **:help usr_28**
-* [Python indent][49] \- this is a plugin that provides smart indentation based on [PEP8][50] style guide. There is nothing you need to do. Vim will automatically add the indentation for you.
-* [Pydoc][51] \- this plugin allows you to search the Python documentation from within Python.
-Usage:
- * Bring up the Python documentation for the regular expression module **:Pydoc re**
- * Search the documentation for the current word (see :help word for Vim's definition of what constitutes a word) the cursor is on: **&ltLeader&gtpw**
- * Search the documentation for the current WORD (see :help WORD): **&ltLeader&gtpW**
-
-*Note: I have mapped the leader key to a comma in my advanced vimrc file so you would perform the searches with the following keystrokes: **,pw ** and **,pW**
-
-
-[[Table of Contents][24]]
-
-
-[1]: http://www.jasondrury.com#intro
-[2]: http://www.jasondrury.com#navigate
-[3]: http://www.jasondrury.com#insert
-[4]: http://www.jasondrury.com#deletion
-[5]: http://www.jasondrury.com#yank
-[6]: http://www.jasondrury.com#searching
-[7]: http://www.jasondrury.com#substitution
-[8]: http://www.jasondrury.com#case
-[9]: http://www.jasondrury.com#replace
-[10]: http://www.jasondrury.com#mark
-[11]: http://www.jasondrury.com#spellcheck
-[12]: http://www.jasondrury.com#visual
-[13]: http://www.jasondrury.com#misc
-[14]: http://www.jasondrury.com#files
-[15]: http://www.jasondrury.com#windows
-[16]: http://www.jasondrury.com#help
-[17]: http://www.jasondrury.com#vimrc
-[18]: http://www.jasondrury.com#plugins
-[19]: http://www.jasondrury.com#python
-[20]: http://www.jasondrury.com#map
-[21]: http://www.amazon.com/gp/product/059652983X/ref=as_li_ss_tl?ie=UTF8&tag=jasondrury-20&linkCode=as2&camp=217145&creative=399369&creativeASIN=059652983X
-[22]: http://www.swaroopch.com/notes/Vim_en:Table_of_Contents
-[23]: http://www.jasondrury.com/about.php#contact
-[24]: http://www.jasondrury.com#toc
-[25]: http://vimdoc.sourceforge.net/htmldoc/usr_10.html#10.2
-[26]: http://vim.wikia.com/wiki/Switching_case_of_characters
-[27]: http://www.jasondrury.com/links.php#vim
-[28]: http://vimdoc.sourceforge.net/htmldoc/
-[29]: http://vim.wikia.com/wiki/Open_vimrc_file
-[30]: http://jaredforsyth.com/projects/vim-debug/
-[31]: http://jaredforsyth.com/blog/2010/jul/16/installing-vim-debug/
-[32]: http://www.jasondrury.com/ref_python.php#debug
-[33]: http://www.vim.org/scripts/script.php?script_id=2540
-[34]: http://manual.macromates.com/en/snippets#snippets
-[35]: http://www.vim.org/scripts/script.php?script_id=1658
-[36]: http://www.vim.org/scripts/script.php?script_id=1643
-[37]: http://www.vim.org/scripts/script.php?script_id=1697
-[38]: http://vim-taglist.sourceforge.net
-[39]: http://ctags.sourceforge.net
-[40]: http://fholgado.com/minibufexpl
-[41]: http://www.vim.org/scripts/script.php?script_id=3025
-[42]: http://www.vim.org/scripts/script.php?script_id=2572
-[43]: http://betterthangrep.com/
-[44]: http://sjl.bitbucket.org/gundo.vim/
-[45]: http://www.vim.org/scripts/script_search_results.php?order_by=rating
-[46]: http://dancingpenguinsoflight.com/2009/02/python-and-vim-make-your-own-ide/
-[47]: http://www.vim.org/scripts/script.php?script_id=850
-[48]: http://www.vim.org/scripts/script.php?script_id=1494
-[49]: http://www.vim.org/scripts/script.php?script_id=974
-[50]: http://www.python.org/dev/peps/pep-0008/
-[51]: http://www.vim.org/scripts/script.php?script_id=910