diff options
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 82 |
1 files changed, 43 insertions, 39 deletions
@@ -27,7 +27,8 @@ Bundle 'vim-scripts/utl.vim' Bundle 'tmhedberg/SimpylFold' Bundle 'nvie/vim-flake8' Bundle 'majutsushi/tagbar' -Bundle 'junegunn/fzf.vim' +Bundle 'francoiscabrol/ranger.vim' +Bundle 'rbgrouleff/bclose.vim' call vundle#end() filetype plugin indent on "}}} @@ -213,37 +214,38 @@ set wildignore+=*.o,*.obj,.git,*.rbc,*.class,.svn,vendor/gems/* "Trying ranger -function! RangeChooser() - let temp = tempname() - " The option "--choosefiles" was added in ranger 1.5.1. Use the next line - " with ranger 1.4.2 through 1.5.0 instead. - "exec 'silent !ranger --choosefile=' . shellescape(temp) - if has("gui_running") - exec 'silent !xterm -e ranger --choosefiles=' . shellescape(temp) - else - exec 'silent !ranger --choosefiles=' . shellescape(temp) - endif - if !filereadable(temp) - redraw! - " Nothing to read. - return - endif - let names = readfile(temp) - if empty(names) - redraw! - " Nothing to open. - return - endif - " Edit the first item. - exec 'edit ' . fnameescape(names[0]) - " Add any remaning items to the arg list/buffer list. - for name in names[1:] - exec 'argadd ' . fnameescape(name) - endfor - redraw! -endfunction -command! -bar RangerChooser call RangeChooser() -nnoremap <leader>nt :<C-U>RangerChooser<CR> +"function! RangeChooser() +" let temp = tempname() +" " The option "--choosefiles" was added in ranger 1.5.1. Use the next line +" " with ranger 1.4.2 through 1.5.0 instead. +" "exec 'silent !ranger --choosefile=' . shellescape(temp) +" if has("gui_running") +" exec 'silent !xterm -e ranger --choosefiles=' . shellescape(temp) +" else +" exec 'silent !ranger --choosefiles=' . shellescape(temp) +" endif +" if !filereadable(temp) +" redraw! +" " Nothing to read. +" return +" endif +" let names = readfile(temp) +" if empty(names) +" redraw! +" " Nothing to open. +" return +" endif +" " Edit the first item. +" exec 'edit ' . fnameescape(names[0]) +" " Add any remaning items to the arg list/buffer list. +" for name in names[1:] +" exec 'argadd ' . fnameescape(name) +" endfor +" redraw! +"endfunction +"command! -bar RangerChooser call RangeChooser() + +nnoremap <leader>nt :<C-U>Ranger<CR> " Backups ----------------------------------------------------------------------{{{ @@ -375,13 +377,13 @@ noremap zE <Nop> " }}} " Plugins {{{ "Ctrl P {{{ -nnoremap <leader>r :History<cr> -nnoremap <leader>m :Buffers<cr> -nnoremap <leader>. :Files<cr> -nnoremap <leader>w :Files ~/writing/wired/<cr> -nnoremap <leader>a :Files app/<cr> +nnoremap <leader>r :CtrlPMRU<cr> +nnoremap <leader>m :CtrlPBuffer<cr> +nnoremap <leader>. :CtrlP<cr> +nnoremap <leader>w :CtrlP ~/writing/wired/<cr> +nnoremap <leader>a :CtrlP app/<cr> nnoremap <leader>d :CtrlP $HOME/notes/<cr> -nnoremap <leader>l :Files $HOME/writing/luxagraf/<cr> +nnoremap <leader>l :CtrlP $HOME/writing/luxagraf/<cr> let g:ctrlp_custom_ignore = { \ 'dir': '\v[\/]\.(git|hg|svn|venv|site|static)$', \ 'file': '\v\.(pyc|so|dll)$', @@ -401,8 +403,10 @@ let g:SuperTabDefaultCompletionType = '<C-n>' nnoremap <silent> <c-s> :NV<CR> let g:markdown_fold_style = 'nested' -nmap <Leader>o :Utl openLink underCursor edit<CR> +nmap <leader>i :%s/
//g +nmap <Leader>o :Utl openLink underCursor edit<CR> +imap jj <Esc> vmap <silent> <leader>r <esc>:'<,'>:w !espeak &> /dev/null <CR> "wayland hack: |