Commit 377415aa authored by Dom Sekotill's avatar Dom Sekotill
Browse files

General tweaks for vim/nvim

- .vimrc is re-sourcable
- Remove old :Mv command, replaced by CtrlSpace
- Backspace no longer deletes indents
parent 3699ffb5
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ call pathogen#infect()

set number nowrap background=dark
set nobackup nowritebackup noswapfile
set backspace=start
set tabpagemax=30
set showtabline=2
set nohlsearch
@@ -103,6 +104,9 @@ nnoremap <space> za

" === HIGH-LIGHTING ===

" Clear BufWinEnter autocommands
au! BufWinEnter

" Some unwanted white-space high-lighting
highlight ExtraWhitespace ctermbg=darkgreen guibg=lightgreen
au BufWinEnter * match ExtraWhitespace /\v([^\t]+)@>\t+|(\s{2,}|(\w.*)@<!\s)$/
@@ -130,9 +134,6 @@ endif

" === MISC COMMANDS ===

" A little home-made command for renaming the current file
command -nargs=1 -bang -complete=file Mv let orgFilename=expand("%")|f <args>|w<bang>|exec 'silent !rm '.orgFilename|redraw!

" A homemade command to copy the unamed register up to tmux's buffers
map tp :call s:pasteup()<CR><ESC>
func! s:pasteup()
@@ -141,7 +142,7 @@ func! s:pasteup()
endfunc

" A homemade command for inserting filenames from the command line
command -nargs=1 -complete=file I call s:insertText(<f-args>)
command! -nargs=1 -complete=file I call s:insertText(<f-args>)
func! s:insertText(string)
	"put=a:string
	exe "normal a".a:string