diff --git a/.gitignore b/.gitignore index 8d66da36..5fb7daf6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,3 @@ sources_non_forked/ack.vim/.netrwhist temp_dirs/yankring_history_v2.txt sources_forked/yankring/doc/tags sources_non_forked/tlib/doc/tags -my_configs.vim diff --git a/my_configs.vim b/my_configs.vim new file mode 100644 index 00000000..9f39af4f --- /dev/null +++ b/my_configs.vim @@ -0,0 +1,91 @@ +set mouse=a +colorscheme molokai +set background=dark +let g:airline_theme = 'molokai' +let g:molokai_original = 1 +set smartindent +autocmd BufWritePre * :FixWhitespace +set timeoutlen=2000 +set pastetoggle= +inoremap jk +nnoremap ; : +#set colorcolumn=80 +" Open Vim, be able to undo +set undodir=$HOME/.vim/undo +set undolevels=1000 +set undoreload=10000 + +" System wide copy paste +set clipboard=unnamedplus + +" Make Y behave like other capitals +map Y y$ +" +" " Start scrolling 3 lines before the border +set scrolloff=3 +" +" " Automatically reread files that have been changed externally +set autoread +" +" " Make ^e and ^y scroll 3 lines instead of 1 +nnoremap 3 +nnoremap 3 +" +" " don't move the cursor after pasting +" " (by jumping to back start of previously changed text) +noremap p p`[ +noremap P P`[ +" +" " Reselect visual block after indent/outdent +vnoremap < >gv + +" Turn off the christmas lights +nnoremap :nohlsearch +" Allow saving as root by w!! +cmap w!! %!sudo tee > /dev/null % + +" Finde merge conflict markers +nmap cf /\v^[<=>]{7}( .*\|$) + +" Use Marked.app to preview Markdown files... +function! s:setupMarkup() + nnoremap p :silent !open -a Marked.app '%:p' +endfunction + +" Navigate splits more easily +map h +map j +map k +map l + +" " These makes j/k move up/down a screen line instead of a physical file line (for wrapped lines) +nmap k gk +nmap j gj + +" autocmd BufEnter * if &modifiable | NERDTreeFind | wincmd p | endif + +" Easymotion {{{ +let g:EasyMotion_do_mapping = 0 + +nnoremap f :call EasyMotion#F(0, 0) +onoremap f :call EasyMotion#F(0, 0) +vnoremap f :call EasyMotion#F(1, 0) + +nnoremap F :call EasyMotion#F(0, 1) +onoremap F :call EasyMotion#F(0, 1) +vnoremap F :call EasyMotion#F(1, 1) + +onoremap t :call EasyMotion#T(0, 0) +onoremap T :call EasyMotion#T(0, 1) +" }}} + + +source ~/.vim_runtime/maximum_awesome_vimrc + + +set tabstop=2 +set shiftwidth=2 +set expandtab +set smartindent +set autoindent