Skip to content

Commit

Permalink
Merge branch 'master' of github.com:slik/vim-plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
slik committed May 9, 2012
2 parents 3156b91 + af9bb10 commit 4655217
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions bootstrap.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set nocompatible

" database mysql
if has("autocmd")
autocmd BufRead *.sql set filetype=mysql
autocmd BufRead *.sql set filetype=mysql
endif

" encoding
Expand All @@ -26,8 +26,8 @@ set nu
set incsearch

" scroll
set scrolljump=5
set scrolloff=5
set scrolljump=3
set scrolloff=3

" beep off
set novisualbell
Expand All @@ -49,7 +49,7 @@ set guioptions-=m
syntax on

" show cursor line
:set cursorline
set cursorline

" tabs
set shiftwidth=4
Expand Down Expand Up @@ -138,6 +138,23 @@ function! <SID>StripTrailingWhitespaces()
endfunction
autocmd BufWritePre *.py,*.php,*.js :call <SID>StripTrailingWhitespaces()

" Bubble single line
nmap <C-Up> ddkP
nmap <C-Down> ddp
" Bubble mutiple lines
vmap <C-Up> xkP`[V`]
vmap <C-down> xp`[V`]
" shows highlight group
nmap <C-S-P> :call <SID>SynStack()<CR>
function! <SID>SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunction

" Show syntax highlighting groups for word under cursor
nmap <C-S-P> :call <SID>SynStack()<CR>
function! <SID>SynStack()
Expand Down

0 comments on commit 4655217

Please sign in to comment.