Skip to content

Commit 57f6643

Browse files
committed
Rename plugin for pretiness
From vim-context_commentstring to vim-context-commentstring. The problem with the autoload variable is solved by using context#commentstring as autoload namespace.
1 parent cd2a4e4 commit 57f6643

File tree

4 files changed

+32
-32
lines changed

4 files changed

+32
-32
lines changed

README

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
See the documentation in the doc/context_commentstring.txt file, or browse it
1+
See the documentation in the doc/context-commentstring.txt file, or browse it
22
online from the hosted source code in:
33

4-
https://raw.github.com/suy/vim-context_commentstring/master/doc/vim-context_commentstring.txt
4+
https://raw.github.com/suy/vim-context-commentstring/master/doc/context-commentstring.txt
55

66
Or HTML formatted (thanks to Kana Natsuno's vim-doc.heroku.com) at:
77

8-
http://ur1.ca/e7n30
8+
http://ur1.ca/e7x0q

autoload/context_commentstring.vim renamed to autoload/context/commentstring.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
" Copyright: © 2013 Alejandro Exojo Piqueras <http://disperso.net/>
33
" License: MIT (see doc for details).
44

5-
let g:context_commentstring#table = {}
5+
let g:context#commentstring#table = {}
66

7-
let g:context_commentstring#table.vim = {
7+
let g:context#commentstring#table.vim = {
88
\ 'vimLuaRegion' : '--%s',
99
\ 'vimPerlRegion' : '#%s',
1010
\ 'vimPythonRegion' : '#%s',
1111
\}
1212

13-
let g:context_commentstring#table.html = {
13+
let g:context#commentstring#table.html = {
1414
\ 'javaScript' : '//%s',
1515
\ 'cssStyle' : '/*%s*/',
1616
\}

doc/context_commentstring.txt renamed to doc/context-commentstring.txt

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*context_commentstring.txt* For Vim version 7.3 Last change: 2013 July 6
1+
*context-commentstring.txt* For Vim version 7.3 Last change: 2013 July 6
22

33
Version 0.1.0
44
Script ID: ????
@@ -24,22 +24,22 @@ License: MIT license {{{
2424
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2525
}}}
2626

27-
CONTENTS *context_commentstring-contents*
27+
CONTENTS *context-commentstring-contents*
2828

29-
Introduction |context_commentstring-introduction|
30-
Installation |context_commentstring-installation|
31-
Configuration and usage |context_commentstring-configuration|
32-
Movement table |context_commentstring-table|
33-
Customization |context_commentstring-customization|
34-
Bugs and limitations |context_commentstring-bugs|
35-
Credits and considerations |context_commentstring-credits|
36-
Changelog |context_commentstring-changelog|
29+
Introduction |context-commentstring-introduction|
30+
Installation |context-commentstring-installation|
31+
Configuration and usage |context-commentstring-configuration|
32+
Movement table |context-commentstring-table|
33+
Customization |context-commentstring-customization|
34+
Bugs and limitations |context-commentstring-bugs|
35+
Credits and considerations |context-commentstring-credits|
36+
Changelog |context-commentstring-changelog|
3737

3838

3939
==============================================================================
40-
INTRODUCTION *context_commentstring-introduction*
40+
INTRODUCTION *context-commentstring-introduction*
4141

42-
*context_commentstring* is a Vim plugin that sets the value of 'commentstring'
42+
*context-commentstring* is a Vim plugin that sets the value of 'commentstring'
4343
to a different value depending on the region of the file you are in. Is only
4444
useful for |file-types| where is possible to have a language embedded in a
4545
language. The most common example are small pieces of CSS or JavaScript in an
@@ -57,7 +57,7 @@ code. Find the plugin at:
5757
https://github.com/tpope/vim-commentary
5858

5959
------------------------------------------------------------------------------
60-
INSTALLATION *context_commentstring-installation*
60+
INSTALLATION *context-commentstring-installation*
6161

6262
The usual for any other Vim plugin: copy the files where Vim will look for
6363
them with the same directory layout that came with the plugin. If you use
@@ -67,25 +67,25 @@ $HOME/.vim, and on Windows $HOME/vimfiles. See |vimfiles| for details.
6767

6868
If you don't have installed any plugins yet, I strongly recommend to first
6969
install and configure a plugin manager (a plugin to help you with other
70-
plugins), and then install |context_commentstring|. My recommendation is that
70+
plugins), and then install |context-commentstring|. My recommendation is that
7171
you start with Pathogen because is very simple and it works very well with a
7272
version control system. Find it at:
7373
https://github.com/tpope/vim-pathogen
7474

7575
------------------------------------------------------------------------------
76-
CONFIGURATION AND USAGE *context_commentstring-configuration*
76+
CONFIGURATION AND USAGE *context-commentstring-configuration*
7777

7878
It should work out of the box for HTML and Vim. It will simply change the
7979
value of |commentstring| when you are in the appropriate region. See below for
8080
how to customize or extend it.
8181

8282
==============================================================================
83-
CUSTOMIZATION *context_commentstring-customization*
83+
CUSTOMIZATION *context-commentstring-customization*
8484

8585
The plugin works by checking if the current syntax group matches a group of an
8686
embedded language, for example, JavaScript inside HTML. You can check the
8787
default values by looking the source code, or simply with >
88-
echo g:context_commentstring#table
88+
echo g:context-commentstring#table
8989
<
9090

9191
This variable is of type |Dictionary|, and you can modify it to your will. You
@@ -101,7 +101,7 @@ respectively.
101101
You will need to know the names of the syntax group. For that, you can use the
102102
|zS| command provided by |scriptease|, or use this simple but convenient
103103
snippet of code: >
104-
augroup temporary_test
104+
augroup temporary-test
105105
autocmd CursorMoved <buffer>
106106
\ echo map(synstack(line('.'), col('.')),
107107
\ 'synIDattr(v:val, "name")')
@@ -114,19 +114,19 @@ And when you are done with your testing, remove the echo doing: >
114114

115115

116116
==============================================================================
117-
BUGS *context_commentstring-bugs*
117+
BUGS *context-commentstring-bugs*
118118

119119
At the moment, there is only one known issue: it doesn't work properly at the
120120
edges of the embedded language, where the boundary is. Is unlikely that this
121121
will have a solution, and is an uncommon case anyway. Try to move the cursor
122122
one extra line further.
123123

124124
Feel free to contact the author through Gitorious or GitHub:
125-
https://gitorious.org/vim-for-qt-kde/vim-context_commentstring
126-
https://github.com/suy/vim-context_commentstring
125+
https://gitorious.org/vim-for-qt-kde/vim-context-commentstring
126+
https://github.com/suy/vim-context-commentstring
127127

128128
==============================================================================
129-
CREDITS AND CONSIDERATIONS *context_commentstring-credits*
129+
CREDITS AND CONSIDERATIONS *context-commentstring-credits*
130130

131131
This plugin was created almost solely to be used as a sidekick for
132132
|commentary.txt|, by Tim Pope. And I only had the guts to attempt to implement
@@ -138,7 +138,7 @@ Natsuno and Shougo Matsushita, is probably the most brilliant and active Vim
138138
plugin author.
139139

140140
==============================================================================
141-
CHANGELOG *context_commentstring-changelog*
141+
CHANGELOG *context-commentstring-changelog*
142142

143143
0.1.0 2013-06-06
144144
- First public release.

plugin/context_commentstring.vim renamed to plugin/context-commentstring.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ augroup END
1414

1515

1616
function! s:Bootstrap()
17-
if !empty(&filetype) && has_key(g:context_commentstring#table, &filetype)
17+
if !empty(&filetype) && has_key(g:context#commentstring#table, &filetype)
1818
let b:original_commentstring=&l:commentstring
1919
augroup ContextCommentstringEnabled
2020
autocmd!
@@ -28,8 +28,8 @@ function! s:UpdateCommentString()
2828
let stack = synstack(line('.'), col('.'))
2929
if !empty(stack)
3030
for name in map(stack, 'synIDattr(v:val, "name")')
31-
if has_key(g:context_commentstring#table[&filetype], name)
32-
let &commentstring = g:context_commentstring#table[&filetype][name]
31+
if has_key(g:context#commentstring#table[&filetype], name)
32+
let &commentstring = g:context#commentstring#table[&filetype][name]
3333
return
3434
endif
3535
endfor

0 commit comments

Comments
 (0)