From 5c3762d440af0df14a518777c0d1e871cf5a05a9 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Thu, 13 Apr 2017 14:19:38 +0100 Subject: [PATCH] Make some changes --- .vimrc | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/.vimrc b/.vimrc index 67cf96a..3158376 100644 --- a/.vimrc +++ b/.vimrc @@ -11,6 +11,9 @@ filetype plugin on call pathogen#infect() call pathogen#helptags() +let mapleader = "," +let maplocalleader = "\\" + " Set auto read so a file is updated if externally changed set autoread @@ -68,30 +71,23 @@ let g:airline_theme='dark' " Make vim default to the plus register (system clipboard) when yanking etc. "set clipboard=unnamedplus -" Shows the command I am typing. I really wish this could be in airline but don't think it can -set showcmd - " Disable Scroll wheel :map :map " Make Ctrl C and Ctrl V work on system buffer -nnoremap "+y vnoremap "+y -"nnoremap "+p -"nnoremap "+P inoremap "+pa +" Make atrl t open new tab nnoremap :tabnew -nnoremap :tabnext -nnoremap :tabprevious " map gV to select previously pasted nnoremap gV "`[".getregtype(v:register)[0]."`]" +" " Set :w!! to save with sudo cmap w!! w !sudo tee % - "Run current line as command nnoremap Q !!$SHELL @@ -101,6 +97,9 @@ inoremap :sil exe ".!which " s/^/#!/ filetype dete " DO bullet points inoremap :exe "norm Ypf lDB\"A +" edit vimrc +nnoremap ev :vsplit $MYVIMRC +nnoremap sv :source $MYVIMRC fun! Start() " Don't run if: we have commandline arguments, we don't have an empty @@ -142,16 +141,23 @@ endfun " Run after "doing all the startup stuff" " autocmd VimEnter * call Start() - -" Folding -nnoremap :tabn -nnoremap :tabn -nnoremap :tabn -nnoremap :tabn -nnoremap :tabn -au FileType html,css,less,javascript,php setl foldmethod=indent foldenable - -"set es6 files to javascript -augroup filetypedetect +augroup file_web + autocmd! + autocmd FileType html,css,less,javascript,php setlocal foldmethod=indent foldenable +augroup END +" +" +augroup file_vim + autocmd! + autocmd FileType vim setlocal foldmethod=marker foldenable + autocmd FileType vim setlocal foldcolumn=3 +augroup END +" +""set es6 files to javascript +augroup detectES6 + autocmd! autocmd BufNew,BufNewFile,BufRead *.es6 :setfiletype javascript augroup END + + +