Mercurial > hg > dml-home
comparison .vim/bundle/vim-commentary/README.markdown @ 3:19d1235ce229
More stigg.
author | samer |
---|---|
date | Sun, 18 Jan 2015 18:35:47 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:3255717f4e6b | 3:19d1235ce229 |
---|---|
1 # commentary.vim | |
2 | |
3 Comment stuff out. Use `gcc` to comment out a line (takes a count), | |
4 `gc` to comment out the target of a motion (for example, `gcap` to | |
5 comment out a paragraph), `gc` in visual mode to comment out the selection, | |
6 and `gc` in operator pending mode to target a comment. You can also use | |
7 it as a command, either with a range like `:7,17Commentary`, or as part of a | |
8 `:global` invocation like with `:g/TODO/Commentary`. That's it. | |
9 | |
10 I wrote this because 5 years after Vim added support for mapping an | |
11 operator, I still couldn't find a commenting plugin that leveraged that | |
12 feature (I overlooked | |
13 [tcomment.vim](https://github.com/tomtom/tcomment_vim)). Striving for | |
14 minimalism, it weighs in at under 100 lines of code. | |
15 | |
16 Oh, and it uncomments, too. The above maps actually toggle, and `gcgc` | |
17 uncomments a set of adjacent commented lines. | |
18 | |
19 ## Installation | |
20 | |
21 If you don't have a preferred installation method, I recommend | |
22 installing [pathogen.vim](https://github.com/tpope/vim-pathogen), and | |
23 then simply copy and paste: | |
24 | |
25 cd ~/.vim/bundle | |
26 git clone git://github.com/tpope/vim-commentary.git | |
27 | |
28 Once help tags have been generated, you can view the manual with | |
29 `:help commentary`. | |
30 | |
31 ## FAQ | |
32 | |
33 > My favorite file type isn't supported! | |
34 | |
35 Relax! You just have to adjust `'commentstring'`: | |
36 | |
37 autocmd FileType apache set commentstring=#\ %s | |
38 | |
39 ## Self-Promotion | |
40 | |
41 Like commentary.vim? Follow the repository on | |
42 [GitHub](https://github.com/tpope/vim-commentary) and vote for it on | |
43 [vim.org](http://www.vim.org/scripts/script.php?script_id=3695). And if | |
44 you're feeling especially charitable, follow [tpope](http://tpo.pe/) on | |
45 [Twitter](http://twitter.com/tpope) and | |
46 [GitHub](https://github.com/tpope). | |
47 | |
48 ## License | |
49 | |
50 Copyright (c) Tim Pope. Distributed under the same terms as Vim itself. | |
51 See `:help license`. |