Merge pull request #183 from rhysd/add/save_xxx_snippets
Added save_xxx snippets
This commit is contained in:
commit
6224509a90
@ -183,4 +183,25 @@ abbr lua <<EOF | EOF
|
||||
${0}
|
||||
EOF
|
||||
|
||||
snippet save_pos
|
||||
options head
|
||||
abbr use pos save
|
||||
let pos_save = getpos('.')
|
||||
${0}
|
||||
call setpos('.', pos_save)
|
||||
|
||||
snippet save_register
|
||||
options head
|
||||
abbr use register save
|
||||
let save_reg_$1 = getreg('${1}')
|
||||
let save_regtype_$1 = getregtype('$1')
|
||||
${0}
|
||||
call setreg('$1', save_reg_$1, save_regtype_$1)
|
||||
|
||||
snippet save_option
|
||||
options head
|
||||
abbr use option save
|
||||
let $1_save = &${1}
|
||||
let &$1 = ${2}
|
||||
${0}
|
||||
let &$1 = $1_save
|
||||
|
Loading…
Reference in New Issue
Block a user