Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/home/.vim/after/ftplugin/tcl_snippets.vim
diff options
context:
space:
mode:
Diffstat (limited to 'home/.vim/after/ftplugin/tcl_snippets.vim')
-rw-r--r--home/.vim/after/ftplugin/tcl_snippets.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/home/.vim/after/ftplugin/tcl_snippets.vim b/home/.vim/after/ftplugin/tcl_snippets.vim
new file mode 100644
index 0000000..e5a9b98
--- /dev/null
+++ b/home/.vim/after/ftplugin/tcl_snippets.vim
@@ -0,0 +1,14 @@
+if !exists('loaded_snippet') || &cp
+ finish
+endif
+
+let st = g:snip_start_tag
+let et = g:snip_end_tag
+let cd = g:snip_elem_delim
+
+exec "Snippet switch switch ".st.et." -- $".st."var".et." {<CR>".st."match".et." {<CR>".st.et."<CR>}<CR>default<CR>{".st.et."}<CR>}<CR>".st.et
+exec "Snippet foreach foreach ".st."var".et." $".st."list".et." {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet proc proc ".st."name".et." {".st."args".et."} <CR>{<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet if if {".st."condition".et."} {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet for for {".st."i".et." {".st.et."} {".st.et."} {<CR>".st.et."<CR>}<CR>".st.et
+exec "Snippet while while {".st."condition".et."} {<CR>".st.et."<CR>}<CR>".st.et