Skip to content

Commit

Permalink
moving from snipmate to ultisnip
Browse files Browse the repository at this point in the history
--HG--
branch : myvim
  • Loading branch information
jeffbuttars committed Feb 14, 2012
1 parent a6faa51 commit 7835f64
Show file tree
Hide file tree
Showing 54 changed files with 51 additions and 6,895 deletions.
13 changes: 7 additions & 6 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Bundle 'gmarik/vundle'
" git-hub specific bundles:
Bundle 'vim-scripts/LustyExplorer'
" Bundle 'garbas/vim-snipmate'
Bundle 'UltiSnips'
Bundle 'UltiSnips-2.0'
Bundle 'vim-scripts/tComment'
Bundle 'rygwdn/vim-conque'
" Bundle 'kogakure/vim-sparkup'
Expand Down Expand Up @@ -299,10 +299,7 @@ set autoread
" if we have sudo privileges, " when we're not currently useing vim as root
cmap w!! %!sudo tee > /dev/null %
" Auto close the preview window after a short time of inactivity
autocmd CursorHold * if pumvisible() == 0|pclose|endif
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif

"
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
"
Expand Down Expand Up @@ -412,6 +409,10 @@ autocmd FileType python set ft=python.django " For SnipMate
autocmd BufRead *.djml set ft=html.htmldjango " For SnipMate
autocmd FileType mkd set ft=mkd.html


let g:UltiSnipsListSnippets = "<c-q>"


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" From an idea by Michael Naumann
"You press * or # to search for the current visual selection !! Really useful
Expand Down Expand Up @@ -886,7 +887,7 @@ let Tlist_Display_Prototype = 1
" I define in hacks.vim
let g:maxLineLength=80
"
" I put my small Vim hacks into a seperate file called hacks.vim
" I put my small Vim hacks into a seperate file called [hacks.vim](https://github.com/jeffbuttars/Viming-With-Buttars/blob/master/hacks.vim file)
" There are things, often functions/commands, I don't want in my
" .vimrc but I also don't want to write a plugin for.
" I source it last thing
Expand Down
10 changes: 0 additions & 10 deletions ftplugin/html_snip_helper.vim

This file was deleted.

8 changes: 0 additions & 8 deletions ftplugin/snippet.vim

This file was deleted.

1 change: 0 additions & 1 deletion ftplugin/snippets.vim

This file was deleted.

72 changes: 40 additions & 32 deletions hacks.vim
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@

" If I'm in a CPBSD dev dir, default the make command
" to be cpmake
if $CPBSDSRCDIR != "" && getcwd() =~ "^".$CPBSDSRCDIR
set makeprg=cpmake

let tstr = $CPBSDSRCDIR."/tags"
if filereadable( tstr )
"" make sure our big ass bsd tags file
"" is used in subdirs as well.
set tags+=tstr
endif

nmap <silent> <F10> <ESC>:w<CR><ESC>:make -j10 kernel<CR><ESC>make -10 build<CR><ESC>:make imageclean<CR><ESC>make image<CR>
imap <silent> <F10> <ESC>:w<CR><ESC>:make -j10 kernel<CR><ESC>make -10 build<CR><ESC>:make imageclean<CR><ESC>make image<CR>
nmap <silent> <F9> <ESC>:w<CR><ESC>:make all<CR>
imap <silent> <F9> <ESC>:w<CR><ESC>:make all<CR>
nmap <silent> <F8> <ESC>:w<CR><ESC>:make -j10 build<CR>
imap <silent> <F8> <ESC>:w<CR><ESC>:make -j10 build<CR>
nmap <silent> <F7> <ESC>:w<CR><ESC>:make imageclean<CR><ESC>:make image<CR>
imap <silent> <F7> <ESC>:w<CR><ESC>:make imageclean<CR><ESC>:make image<CR>
nmap <silent> <F6> <ESC>:w<CR><ESC>:make kernel<CR>
imap <silent> <F6> <ESC>:w<CR><ESC>:make kernel<CR>
else
nmap <silent> <F6> <ESC>:w<CR><ESC>:make<CR><CR><CR>
imap <silent> <F6> <ESC>:w<CR><ESC>:make<CR><CR><CR>
endif
" to be cpmake.
" I don't use this anymore. Relic from a previous job.
" The gist is, if I'm under a certain directory than I assume
" I'm working on a specific problem. In that case I setup
" some hotkeys to make the overlly verbose build commands easier.
" if $CPBSDSRCDIR != "" && getcwd() =~ "^".$CPBSDSRCDIR
" set makeprg=cpmake
"
" let tstr = $CPBSDSRCDIR."/tags"
" if filereadable( tstr )
" "" make sure our big ass bsd tags file
" "" is used in subdirs as well.
" set tags+=tstr
" endif
"
" nmap <silent> <F10> <ESC>:w<CR><ESC>:make -j10 kernel<CR><ESC>make -10 build<CR><ESC>:make imageclean<CR><ESC>make image<CR>
" imap <silent> <F10> <ESC>:w<CR><ESC>:make -j10 kernel<CR><ESC>make -10 build<CR><ESC>:make imageclean<CR><ESC>make image<CR>
" nmap <silent> <F9> <ESC>:w<CR><ESC>:make all<CR>
" imap <silent> <F9> <ESC>:w<CR><ESC>:make all<CR>
" nmap <silent> <F8> <ESC>:w<CR><ESC>:make -j10 build<CR>
" imap <silent> <F8> <ESC>:w<CR><ESC>:make -j10 build<CR>
" nmap <silent> <F7> <ESC>:w<CR><ESC>:make imageclean<CR><ESC>:make image<CR>
" imap <silent> <F7> <ESC>:w<CR><ESC>:make imageclean<CR><ESC>:make image<CR>
" nmap <silent> <F6> <ESC>:w<CR><ESC>:make kernel<CR>
" imap <silent> <F6> <ESC>:w<CR><ESC>:make kernel<CR>
" else
" nmap <silent> <F6> <ESC>:w<CR><ESC>:make<CR><CR><CR>
" imap <silent> <F6> <ESC>:w<CR><ESC>:make<CR><CR><CR>
" endif


" Little something from http://www.ibm.com/developerworks/linux/library/l-vim-script-5/index.html
" Agressive auto saving
function! Autosave()

" close the preview window if it's visible
" and the pop up menu is not visible
if pumvisible() == 0
" and the pop up menu is not visible, but not if
" we're in a preview window.
if pumvisible() == 0 && &buftype == ''
pclose
endif

Expand Down Expand Up @@ -68,7 +73,7 @@ endfunction
" au BufWinEnter * :call SaveView(0)

"highlight OverColLimit term=inverse,bold cterm=bold ctermbg=red ctermfg=black gui=bold guibg=red guifg=black
function! SetColorColumn( ccol )
function! SetColorColumn(ccol)

if ! exists("b:longLineMatchID")
let b:longLineMatchID = 0
Expand All @@ -83,26 +88,29 @@ function! SetColorColumn( ccol )

"echo "SetColorColumn " b:longLineMatchID "" a:ccol "\%>".a:ccol."v.\+"

if &buftype != "" || expand('%') == '' || &buftype == "log" || &ft == "log"
if a:ccol == 0 || &buftype != "" || expand('%') == '' || &buftype == "log" || &ft == "log" || &ft == 'html' || &ft == 'css'
setlocal colorcolumn=0
let &textwidth = (0)
" echo "bailing out"
return
endif

let l:mlist = getmatches()
if len(l:mlist) < 1 || b:longLineMatchID == 0 || &colorcolumn != (a:ccol+1)
"echo "SetColorColumn applying" b:longLineMatchID "" a:ccol "\%>".a:ccol."v.\+"
" echo "SetColorColumn applying" b:longLineMatchID "" a:ccol "\%>".a:ccol."v.\+"
let &colorcolumn = (a:ccol)
let &textwidth = (a:ccol-1)
let b:longLineMatchID=matchadd( "ErrorMsg", '\%>'.a:ccol.'v.\+', -1 )

" exec "normal colorscheme ".g:colors_name
endif
endfunction
if ! exists("g:maxLineLength")
let g:maxLineLength=80
endif

au BufWinEnter,FileType * :call SetColorColumn(g:maxLineLength)
"au FileType python,c,javascript :call SetColorColumn(g:maxLineLength)
" au BufWinEnter,FileType * :call SetColorColumn(g:maxLineLength)
au FileType * :call SetColorColumn(g:maxLineLength)

""""""""""""""""""""""""""""""""""""""
"
Expand Down
4 changes: 4 additions & 0 deletions plugin/doubleTap.vim
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ endfunction

function! s:clearMatch()

if &buftype != "" || expand('%') == ''
return
endif

if ! g:DoubleTap_enable_visual_feedback
return
endif
Expand Down
Binary file removed snippets/.sql.snippets.swo
Binary file not shown.
Loading

0 comments on commit 7835f64

Please sign in to comment.