From f6a3b192b88d313c9f585a4eed17f1b62f90f621 Mon Sep 17 00:00:00 2001 From: Abel Martin Date: Mon, 26 Mar 2012 11:12:53 -0400 Subject: [PATCH 1/7] added a readme file. --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..bc06245 --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +h1. Installation + + +h1. Usage + +The following key mappings are provided by default (there is also a menu +provided that contains menu items corresponding to all the below mappings): + +Most of the following mappings are for normal/visual mode only. The +|NERDComInsertComment| mapping is for insert mode only. + +[count]cc |NERDComComment| +Comment out the current line or text selected in visual mode. + + +[count]cn |NERDComNestedComment| +Same as cc but forces nesting. + + +[count]c |NERDComToggleComment| +Toggles the comment state of the selected line(s). If the topmost selected +line is commented, all selected lines are uncommented and vice versa. + + +[count]cm |NERDComMinimalComment| +Comments the given lines using only one set of multipart delimiters. + + +[count]ci |NERDComInvertComment| +Toggles the comment state of the selected line(s) individually. + + +[count]cs |NERDComSexyComment| +Comments out the selected lines ``sexily'' + + +[count]cy |NERDComYankComment| +Same as cc except that the commented line(s) are yanked first. + + +c$ |NERDComEOLComment| +Comments the current line from the cursor to the end of line. + + +cA |NERDComAppendComment| +Adds comment delimiters to the end of line and goes into insert mode between +them. + + +|NERDComInsertComment| +Adds comment delimiters at the current cursor position and inserts between. +Disabled by default. + + +ca |NERDComAltDelim| +Switches to the alternative set of delimiters. + + +[count]cl +[count]cb |NERDComAlignedComment| +Same as |NERDComComment| except that the delimiters are aligned down the +left side (cl) or both sides (cb). + + +[count]cu |NERDComUncommentLine| +Uncomments the selected line(s). From 69c5335553f1f858cc7ce5b4cf14770571beb5a2 Mon Sep 17 00:00:00 2001 From: Abel Martin Date: Mon, 26 Mar 2012 12:32:56 -0300 Subject: [PATCH 2/7] updated readme. --- README.md | 50 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index bc06245..7776883 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,80 @@ -h1. Installation +# Installation +The NERD Commenter requires Vim 7 or higher. +Extract the plugin files in your ~/.vim (*nix) or ~/vimfiles (Windows). You +should have 2 files: + plugin/NERD_commenter.vim + doc/NERD_commenter.txt -h1. Usage +Next, to finish installing the help file run: + :helptags ~/.vim/doc + +See |add-local-help| for more details. + +Make sure that you have filetype plugins enabled, as the script makes use of +|'commentstring'| where possible (which is usually set in a filetype plugin). +See |filetype-plugin-on| for details, but basically, stick this in your vimrc + filetype plugin on + +# Usage The following key mappings are provided by default (there is also a menu provided that contains menu items corresponding to all the below mappings): -Most of the following mappings are for normal/visual mode only. The -|NERDComInsertComment| mapping is for insert mode only. +Most of the following mappings are for normal/visual mode only. The |NERDComInsertComment| mapping is for insert mode only. -[count]cc |NERDComComment| +**[count]\cc |NERDComComment|** Comment out the current line or text selected in visual mode. -[count]cn |NERDComNestedComment| +**[count]cn |NERDComNestedComment|** Same as cc but forces nesting. -[count]c |NERDComToggleComment| +**[count]c |NERDComToggleComment|** Toggles the comment state of the selected line(s). If the topmost selected line is commented, all selected lines are uncommented and vice versa. -[count]cm |NERDComMinimalComment| +**[count]cm |NERDComMinimalComment|** Comments the given lines using only one set of multipart delimiters. -[count]ci |NERDComInvertComment| +**[count]ci |NERDComInvertComment|** Toggles the comment state of the selected line(s) individually. -[count]cs |NERDComSexyComment| +**[count]cs |NERDComSexyComment|** Comments out the selected lines ``sexily'' -[count]cy |NERDComYankComment| +**[count]cy |NERDComYankComment|** Same as cc except that the commented line(s) are yanked first. -c$ |NERDComEOLComment| +**c$ |NERDComEOLComment|** Comments the current line from the cursor to the end of line. -cA |NERDComAppendComment| +**cA |NERDComAppendComment|** Adds comment delimiters to the end of line and goes into insert mode between them. -|NERDComInsertComment| +**|NERDComInsertComment|** Adds comment delimiters at the current cursor position and inserts between. Disabled by default. -ca |NERDComAltDelim| +**ca |NERDComAltDelim|** Switches to the alternative set of delimiters. -[count]cl -[count]cb |NERDComAlignedComment| +**[count]cl** +**[count]cb |NERDComAlignedComment|** Same as |NERDComComment| except that the delimiters are aligned down the left side (cl) or both sides (cb). -[count]cu |NERDComUncommentLine| +**[count]cu |NERDComUncommentLine|** Uncomments the selected line(s). From 73b3fe939c57c79f1eb12d24bdf97e8b49347675 Mon Sep 17 00:00:00 2001 From: Abel Martin Date: Mon, 26 Mar 2012 11:36:43 -0400 Subject: [PATCH 3/7] adding better styling to the readme. --- README.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 7776883..69bc3c5 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,18 @@ The NERD Commenter requires Vim 7 or higher. Extract the plugin files in your ~/.vim (*nix) or ~/vimfiles (Windows). You should have 2 files: - plugin/NERD_commenter.vim - doc/NERD_commenter.txt +1. plugin/NERD_commenter.vim +2. doc/NERD_commenter.txt Next, to finish installing the help file run: - :helptags ~/.vim/doc +* :helptags ~/.vim/doc -See |add-local-help| for more details. +See **|add-local-help|** for more details. Make sure that you have filetype plugins enabled, as the script makes use of -|'commentstring'| where possible (which is usually set in a filetype plugin). -See |filetype-plugin-on| for details, but basically, stick this in your vimrc - filetype plugin on +**|'commentstring'|** where possible (which is usually set in a filetype plugin). +See **|filetype-plugin-on|** for details, but basically, stick this in your vimrc: +> filetype plugin on # Usage @@ -27,36 +27,36 @@ Most of the following mappings are for normal/visual mode only. The |NERDComInse Comment out the current line or text selected in visual mode. -**[count]cn |NERDComNestedComment|** -Same as cc but forces nesting. +**[count]\cn |NERDComNestedComment|** +Same as \cc but forces nesting. -**[count]c |NERDComToggleComment|** +**[count]\c |NERDComToggleComment|** Toggles the comment state of the selected line(s). If the topmost selected line is commented, all selected lines are uncommented and vice versa. -**[count]cm |NERDComMinimalComment|** +**[count]\cm |NERDComMinimalComment|** Comments the given lines using only one set of multipart delimiters. -**[count]ci |NERDComInvertComment|** +**[count]\ci |NERDComInvertComment|** Toggles the comment state of the selected line(s) individually. -**[count]cs |NERDComSexyComment|** +**[count]\cs |NERDComSexyComment|** Comments out the selected lines ``sexily'' -**[count]cy |NERDComYankComment|** -Same as cc except that the commented line(s) are yanked first. +**[count]\cy |NERDComYankComment|** +Same as \cc except that the commented line(s) are yanked first. -**c$ |NERDComEOLComment|** +**\c$ |NERDComEOLComment|** Comments the current line from the cursor to the end of line. -**cA |NERDComAppendComment|** +**\cA |NERDComAppendComment|** Adds comment delimiters to the end of line and goes into insert mode between them. @@ -66,15 +66,15 @@ Adds comment delimiters at the current cursor position and inserts between. Disabled by default. -**ca |NERDComAltDelim|** +**\ca |NERDComAltDelim|** Switches to the alternative set of delimiters. -**[count]cl** -**[count]cb |NERDComAlignedComment|** +**[count]\cl** +**[count]\cb |NERDComAlignedComment|** Same as |NERDComComment| except that the delimiters are aligned down the -left side (cl) or both sides (cb). +left side (\cl) or both sides (\cb). -**[count]cu |NERDComUncommentLine|** +**[count]\cu |NERDComUncommentLine|** Uncomments the selected line(s). From 57ffc642e1f4c5a2e3a9315e715b87e295f25b67 Mon Sep 17 00:00:00 2001 From: Abel Martin Date: Mon, 26 Mar 2012 12:42:40 -0300 Subject: [PATCH 4/7] Further cleaned up styling --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 69bc3c5..2887be7 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,10 @@ The NERD Commenter requires Vim 7 or higher. Extract the plugin files in your ~/.vim (*nix) or ~/vimfiles (Windows). You -should have 2 files: -1. plugin/NERD_commenter.vim -2. doc/NERD_commenter.txt +should have 2 files: + + plugin/NERD_commenter.vim + doc/NERD_commenter.txt Next, to finish installing the help file run: * :helptags ~/.vim/doc @@ -14,7 +15,8 @@ See **|add-local-help|** for more details. Make sure that you have filetype plugins enabled, as the script makes use of **|'commentstring'|** where possible (which is usually set in a filetype plugin). See **|filetype-plugin-on|** for details, but basically, stick this in your vimrc: -> filetype plugin on + + filetype plugin on # Usage From 4afef1116ce4a8ae62605d4817942bce7a7f99e0 Mon Sep 17 00:00:00 2001 From: Abel Martin Date: Mon, 26 Mar 2012 13:11:24 -0300 Subject: [PATCH 5/7] Completed the documentation style and content updates --- README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2887be7..db4353f 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,26 @@ # Installation -The NERD Commenter requires Vim 7 or higher. -Extract the plugin files in your ~/.vim (*nix) or ~/vimfiles (Windows). You -should have 2 files: +*\*For simplicity, let's use **[VIM_ROOT]** which will mean ~/.vim (\*nix) or ~/vimfiles (Windows)* +The NERD Commenter requires Vim 7 or higher is comprised of 2 files: plugin/NERD_commenter.vim doc/NERD_commenter.txt -Next, to finish installing the help file run: -* :helptags ~/.vim/doc +### Classic Install + +1. Extract the plugin files in your **[VIM_ROOT]**/pulgin and **[VIM_ROOT]**/doc folders respectively. +2. Finish the install by updating your help files. Run: + +
:helptags **[VIM_ROOT]**/doc
See **|add-local-help|** for more details. -Make sure that you have filetype plugins enabled, as the script makes use of +### Pathogen Install +1. Navigate to your **[VIM_ROOT]/bundle** directory in your local Vim setup +2. git clone https://github.com/scrooloose/nerdcommenter.git + +### Post Install +After the **'Classic'** or **'Pathogen'** install, make sure that you have filetype plugins enabled, as the script makes use of **|'commentstring'|** where possible (which is usually set in a filetype plugin). See **|filetype-plugin-on|** for details, but basically, stick this in your vimrc: From cef3a9ce39648892f8e8800fd25df3a8972dc8e5 Mon Sep 17 00:00:00 2001 From: Abel Martin Date: Mon, 26 Mar 2012 13:15:42 -0300 Subject: [PATCH 6/7] fixing a typo --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db4353f..1505dbb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Installation -*\*For simplicity, let's use **[VIM_ROOT]** which will mean ~/.vim (\*nix) or ~/vimfiles (Windows)* +*\*For simplicity, let's use **[VIM_ROOT]** which will mean ~/.vim (\*nix) or ~/vimfiles (Windows)* + The NERD Commenter requires Vim 7 or higher is comprised of 2 files: plugin/NERD_commenter.vim @@ -8,7 +9,7 @@ The NERD Commenter requires Vim 7 or higher is comprised of 2 files: ### Classic Install -1. Extract the plugin files in your **[VIM_ROOT]**/pulgin and **[VIM_ROOT]**/doc folders respectively. +1. Extract the plugin files into your **[VIM_ROOT]**/pulgin and **[VIM_ROOT]**/doc folders respectively. 2. Finish the install by updating your help files. Run:
:helptags **[VIM_ROOT]**/doc
From 1b6058a597a1dd74f4fac43a3ad00042a8b2d07a Mon Sep 17 00:00:00 2001 From: Abel Martin Date: Mon, 26 Mar 2012 13:16:34 -0300 Subject: [PATCH 7/7] another typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1505dbb..3b5b193 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The NERD Commenter requires Vim 7 or higher is comprised of 2 files: 1. Extract the plugin files into your **[VIM_ROOT]**/pulgin and **[VIM_ROOT]**/doc folders respectively. 2. Finish the install by updating your help files. Run: -
:helptags **[VIM_ROOT]**/doc
+
:helptags [VIM_ROOT]/doc
See **|add-local-help|** for more details.