Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 70 lines (48 sloc) 1.947 kb
7dc0814 Tim Pope commentary.vim 1.0
authored
1 commentary.vim
2 ==============
3
4 Comment stuff out. Use `\\\` to comment out a line (takes a count),
5 `\\` to comment out the target of a motion (for example, `\\ap` to
6 comment out a paragraph), and `\\` in visual mode to comment out the
7 selection. That's it.
8
9 Install [repeat.vim](https://github.com/tpope/vim-repeat) to enable
10 repeating with `.` the line commenting map `\\\`.
11
12 I wrote this because 5 years after Vim added support for mapping an
13 operator, I still couldn't find a commenting plugin that leveraged that
7baa64a Tim Pope Add concession
authored
14 feature (I overlooked
30451e8 Tim Pope Typo
authored
15 [tcomment.vim](https://github.com/tomtom/tcomment_vim)). Striving for
7baa64a Tim Pope Add concession
authored
16 minimalism, the first version weighed in at just 35 lines of code.
7dc0814 Tim Pope commentary.vim 1.0
authored
17
18 Oh, and it uncomments, too.
19
20 Installation
21 ------------
22
23 If you don't have a preferred installation method, I recommend
24 installing [pathogen.vim](https://github.com/tpope/vim-pathogen), and
25 then simply copy and paste:
26
27 cd ~/.vim/bundle
28 git clone git://github.com/tpope/vim-commentary.git
29
30 Once help tags have been generated, you can view the manual with
31 `:help commentary`.
32
33 FAQ
34 ---
35
36 > My favorite file type isn't supported!
37
38 Relax! You just have to adjust `'commentstring'`:
39
40 autocmd FileType apache set commentstring=#\ %s
41
42 > What if I want custom maps?
43
44 Fly by the seat of your pants and map directly to the `\` maps:
45
7baa64a Tim Pope Add concession
authored
46 xmap gc \\
47 nmap gc \\
48 nmap gcc \\\
7dc0814 Tim Pope commentary.vim 1.0
authored
49
50 Contributing
51 ------------
52
53 See the contribution guidelines for
54 [pathogen.vim](https://github.com/tpope/vim-pathogen#readme).
55
56 Self-Promotion
57 --------------
58
8e59f1f Tim Pope Fix copy/paste
authored
59 Like commentary.vim? Follow the repository on
7dc0814 Tim Pope commentary.vim 1.0
authored
60 [GitHub](https://github.com/tpope/vim-commentary) and vote for it on
61 [vim.org](http://www.vim.org/scripts/script.php?script_id=3695). And if
62 you're feeling especially charitable, follow [tpope](http://tpo.pe/) on
63 [Twitter](http://twitter.com/tpope) and
64 [GitHub](https://github.com/tpope).
65
66 License
67 -------
68
69 Distributable under the same terms as Vim itself. See `:help license`.
Something went wrong with that request. Please try again.