Skip to content

Commit 377b6cd

Browse files
authored
Merge pull request #52 from vim-jp/add-noswapfile-modifier
Add :nos[wapfile] as modifier
2 parents 0f54843 + 2e4459b commit 377b6cd

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

autoload/vimlparser.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,8 @@ function! s:VimLParser.parse_command_modifiers()
568568
call add(modifiers, {'name': 'leftabove'})
569569
elseif stridx('noautocmd', k) == 0 && len(k) >= 3 " noa\%[utocmd]
570570
call add(modifiers, {'name': 'noautocmd'})
571+
elseif stridx('noswapfile', k) == 0 && len(k) >= 3 " :nos\%[wapfile]
572+
call add(modifiers, {'name': 'noswapfile'})
571573
elseif stridx('rightbelow', k) == 0 && len(k) >= 6 "rightb\%[elow]
572574
call add(modifiers, {'name': 'rightbelow'})
573575
elseif stridx('sandbox', k) == 0 && len(k) >= 3 " san\%[dbox]

js/vimlparser.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,10 @@ VimLParser.prototype.parse_command_modifiers = function() {
769769
// noa\%[utocmd]
770770
viml_add(modifiers, {"name":"noautocmd"});
771771
}
772+
else if (viml_stridx("noswapfile", k) == 0 && viml_len(k) >= 3) {
773+
// :nos\%[wapfile]
774+
viml_add(modifiers, {"name":"noswapfile"});
775+
}
772776
else if (viml_stridx("rightbelow", k) == 0 && viml_len(k) >= 6) {
773777
//rightb\%[elow]
774778
viml_add(modifiers, {"name":"rightbelow"});

py/vimlparser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,9 @@ def parse_command_modifiers(self):
662662
elif viml_stridx("noautocmd", k) == 0 and viml_len(k) >= 3:
663663
# noa\%[utocmd]
664664
viml_add(modifiers, AttributeDict({"name":"noautocmd"}))
665+
elif viml_stridx("noswapfile", k) == 0 and viml_len(k) >= 3:
666+
# :nos\%[wapfile]
667+
viml_add(modifiers, AttributeDict({"name":"noswapfile"}))
665668
elif viml_stridx("rightbelow", k) == 0 and viml_len(k) >= 6:
666669
#rightb\%[elow]
667670
viml_add(modifiers, AttributeDict({"name":"rightbelow"}))

test/test_modifier_commands.ok

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
(call (Func))
2+
(call (Func))

test/test_modifier_commands.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
aboveleft belowright botright browse confirm hide keepalt keepjumps
2+
\ keepmarks keeppatterns lockmarks noswapfile silent tab
3+
\ topleft verbose vertical call Func()
4+
abo bel bo bro conf hid keepalt keepj
5+
\ kee keepp loc nos sil tab
6+
\ to verb vert call Func()

0 commit comments

Comments
 (0)