Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/lovelock/hackvim
Browse files Browse the repository at this point in the history
  • Loading branch information
lovelock committed Mar 2, 2016
2 parents 7fc9c76 + 4f0576a commit f7cee2d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions vimrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" tmux
if exists('$ITERM_PROFILE')
if exists('$TMUX')
set term=screen-256color
let &t_SI = "\<Esc>[3 q"
let &t_EI = "\<Esc>[0 q"
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif
endif

" Sets how many lines of history VIM has to remember
set history=2000

Expand All @@ -27,6 +40,9 @@ filetype plugin indent on
set nobackup
set noswapfile

" Search tags recurrently
set tags=./tags;

" Sets to auto read when a file is modified from outside
set autoread

Expand Down Expand Up @@ -582,3 +598,21 @@ function! <SID>BufcloseCloseIt()
execute("bdelete! ".l:currentBufNum)
endif
endfunction

function! WrapForTmux(s)
if !exists('$TMUX')
return a:s
endif
let tmux_start = "\<Esc>Ptmux;"
let tmux_end = "\<Esc>\\"
return tmux_start . substitute(a:s, "\<Esc>", "\<Esc>\<Esc>", 'g') . tmux_end
endfunction

let &t_SI .= WrapForTmux("\<Esc>[?2004h")
let &t_EI .= WrapForTmux("\<Esc>[?2004l")
function! XTermPasteBegin()
set pastetoggle=<Esc>[201~
set paste
return ""
endfunction
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()
2 changes: 1 addition & 1 deletion vimrc.bundles
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ nnoremap <silent> <leader>z :Goyo<cr>
Bundle 'kien/ctrlp.vim'
let g:ctrlp_map = '<leader>p'
let g:ctrlp_cmd = 'CtrlP'
map <leader>f :CtrlPMRU<CR>
map <leader>f :CtrlPCurWD<CR>
"set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux"
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn|rvm)$',
Expand Down

0 comments on commit f7cee2d

Please sign in to comment.