From a6a8901f1948b0bd5b90f9cac38796684fc5ecde Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Wed, 13 Nov 2013 17:33:04 -0800 Subject: [PATCH] Update vim config - Add CoffeeScript Compile vim shortcut - Add CoffeeScript snippets - Add Python snippets - Fix typo - Remove deprecated setting --- vim/UltiSnips/coffee.snippets | 16 ++++++++++++++++ vim/UltiSnips/python.snippets | 4 ++++ vimrc | 5 +++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/vim/UltiSnips/coffee.snippets b/vim/UltiSnips/coffee.snippets index 68ca03f..8162294 100644 --- a/vim/UltiSnips/coffee.snippets +++ b/vim/UltiSnips/coffee.snippets @@ -1,3 +1,19 @@ snippet timeout "timeout" setTimeout(${1:->}, ${2:500}) endsnippet + +snippet log "Log" ! +console.log ${1:"${2:msg}"} +endsnippet + +snippet cl "console.log" +console.log ${1:"${2:msg}"} +endsnippet + +snippet def "define" +define [ + '${1:path}' +], ( + ${2:Object} +) -> +endsnippet diff --git a/vim/UltiSnips/python.snippets b/vim/UltiSnips/python.snippets index 3457f67..113a362 100644 --- a/vim/UltiSnips/python.snippets +++ b/vim/UltiSnips/python.snippets @@ -1,3 +1,7 @@ snippet map "Map snippet" map(${1:lambda x: x}, ${2:[]}) endsnippet +snippet future "Import from future" !b +from __future__ import (division, absolute_import, print_function, + unicode_literals) +endsnippet diff --git a/vimrc b/vimrc index 6667367..fb8d579 100644 --- a/vimrc +++ b/vimrc @@ -44,6 +44,7 @@ map nt :NERDTreeToggle map ss :setlocal spell! map ct :TlistToggle " taglist shortcut map ts :%s/\s\s*$//g " trim trailing whitespace +map cc :CoffeeCompile " Complie CoffeeScript if bufwinnr(1) map + < @@ -62,7 +63,7 @@ let NERDTreeDirArrows=1 let g:syntastic_phpcs_disable=1 let g:syntastic_auto_loc_list=1 let g:syntastic_stl_format = '[%E{Err: %fe #%e}%B{, }%W{Warn: %fw #%w}]' -let g:syntastic_json_checker = "jsonlint" +"let g:syntastic_json_checker = "jsonlint" let g:syntastic_scss_checkers = [] let g:syntastic_css_checkers = [] @@ -87,7 +88,7 @@ map tn :tabNext map tp :tabprevious map tf :tabfirst map tl :tablast -map tm :tabmove " Tabs set expandtab " expandtab converts tabs to spaces. For tabs, set noexpandtab