Skip to content
Newer
Older
100644 63 lines (45 sloc) 1.87 KB
7dc0814 @tpope commentary.vim 1.0
authored Aug 20, 2011
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 I wrote this because 5 years after Vim added support for mapping an
10 operator, I still couldn't find a commenting plugin that leveraged that
7baa64a @tpope Add concession
authored Aug 20, 2011
11 feature (I overlooked
30451e8 @tpope Typo
authored Aug 20, 2011
12 [tcomment.vim](https://github.com/tomtom/tcomment_vim)). Striving for
a2acf9a @tpope Give us some leeway
authored Mar 10, 2012
13 minimalism, it weighs in at under 100 lines of code.
7dc0814 @tpope commentary.vim 1.0
authored Aug 20, 2011
14
50b0556 @tpope Uncomment adjacent lines
authored Mar 11, 2012
15 Oh, and it uncomments, too. The above maps actually toggle, and `\\u`
dc349bb @tpope Use repeat.vim for \\u and not for \\\
authored Mar 14, 2012
16 uncomments a set of adjacent commented lines. Install
17 [repeat.vim](https://github.com/tpope/vim-repeat) to enable
18 repeating `\\u` with `.` (the other maps are repeatable without it).
7dc0814 @tpope commentary.vim 1.0
authored Aug 20, 2011
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 Contributing
43 ------------
44
45 See the contribution guidelines for
46 [pathogen.vim](https://github.com/tpope/vim-pathogen#readme).
47
48 Self-Promotion
49 --------------
50
8e59f1f @tpope Fix copy/paste
authored Aug 20, 2011
51 Like commentary.vim? Follow the repository on
7dc0814 @tpope commentary.vim 1.0
authored Aug 20, 2011
52 [GitHub](https://github.com/tpope/vim-commentary) and vote for it on
53 [vim.org](http://www.vim.org/scripts/script.php?script_id=3695). And if
54 you're feeling especially charitable, follow [tpope](http://tpo.pe/) on
55 [Twitter](http://twitter.com/tpope) and
56 [GitHub](https://github.com/tpope).
57
58 License
59 -------
60
d5bcdc3 @tpope Clarify copyright
authored Sep 8, 2011
61 Copyright (c) Tim Pope. Distributed under the same terms as Vim itself.
62 See `:help license`.
Something went wrong with that request. Please try again.