From 63fc52ad5769a04ad7da1056acd36dec7623a34e Mon Sep 17 00:00:00 2001 From: rhysd Date: Thu, 26 Sep 2013 00:55:44 +0900 Subject: [PATCH] Added save_xxx snippets Saving some values in temprary variables is common process in writing Vim script. I made snippets for them for DRY. Added save_xxx snippets - save_pos - save_register - save_options Followings are examples of them. let pos_save = getpos('.') call setpos('.', pos_save) let save_reg_g = getreg('g') let save_regtype_g = getregtype('g') call setreg('g', save_reg_g, save_regtype_g) let selection_save = &selection let &selection = let &selection = selection_save --- autoload/neosnippet/snippets/vim.snip | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/autoload/neosnippet/snippets/vim.snip b/autoload/neosnippet/snippets/vim.snip index 697a456..e470ccf 100644 --- a/autoload/neosnippet/snippets/vim.snip +++ b/autoload/neosnippet/snippets/vim.snip @@ -183,4 +183,25 @@ abbr lua <