Make some changes
This commit is contained in:
		
							parent
							
								
									f7cd30fc98
								
							
						
					
					
						commit
						5c3762d440
					
				
					 1 changed files with 26 additions and 20 deletions
				
			
		
							
								
								
									
										46
									
								
								.vimrc
									
										
									
									
									
								
							
							
						
						
									
										46
									
								
								.vimrc
									
										
									
									
									
								
							| 
						 | 
					@ -11,6 +11,9 @@ filetype plugin on
 | 
				
			||||||
call pathogen#infect()
 | 
					call pathogen#infect()
 | 
				
			||||||
call pathogen#helptags()
 | 
					call pathogen#helptags()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let mapleader = ","
 | 
				
			||||||
 | 
					let maplocalleader = "\\"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Set auto read so a file is updated if externally changed
 | 
					" Set auto read so a file is updated if externally changed
 | 
				
			||||||
set autoread
 | 
					set autoread
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,30 +71,23 @@ let g:airline_theme='dark'
 | 
				
			||||||
" Make vim default to the plus register (system clipboard) when yanking etc.
 | 
					" Make vim default to the plus register (system clipboard) when yanking etc.
 | 
				
			||||||
"set clipboard=unnamedplus
 | 
					"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
 | 
					" Disable Scroll wheel
 | 
				
			||||||
:map <ScrollWheelUp> <nop>
 | 
					:map <ScrollWheelUp> <nop>
 | 
				
			||||||
:map <ScrollWheelDown> <nop>
 | 
					:map <ScrollWheelDown> <nop>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Make Ctrl C and Ctrl V work on system buffer
 | 
					" Make Ctrl C and Ctrl V work on system buffer
 | 
				
			||||||
nnoremap <C-c> "+y
 | 
					 | 
				
			||||||
vnoremap <C-c> "+y
 | 
					vnoremap <C-c> "+y
 | 
				
			||||||
"nnoremap <C-v> "+p
 | 
					 | 
				
			||||||
"nnoremap <C-S-v> "+P
 | 
					 | 
				
			||||||
inoremap <C-v> <Esc>"+pa
 | 
					inoremap <C-v> <Esc>"+pa
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Make atrl t open new tab
 | 
				
			||||||
nnoremap <C-t> :tabnew<cr>
 | 
					nnoremap <C-t> :tabnew<cr>
 | 
				
			||||||
nnoremap <C-Tab> :tabnext<cr>
 | 
					 | 
				
			||||||
nnoremap <C-S-Tab> :tabprevious<cr>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
" map gV to select previously pasted
 | 
					" map gV to select previously pasted
 | 
				
			||||||
nnoremap <expr> gV    "`[".getregtype(v:register)[0]."`]"
 | 
					nnoremap <expr> gV    "`[".getregtype(v:register)[0]."`]"
 | 
				
			||||||
 | 
					"
 | 
				
			||||||
" Set :w!! to save with sudo 
 | 
					" Set :w!! to save with sudo 
 | 
				
			||||||
cmap w!! w !sudo tee %
 | 
					cmap w!! w !sudo tee %
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
"Run current line as command
 | 
					"Run current line as command
 | 
				
			||||||
nnoremap Q !!$SHELL <cr>
 | 
					nnoremap Q !!$SHELL <cr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -101,6 +97,9 @@ inoremap <C-y> <Esc>:sil exe ".!which <cWORD>" <bar> s/^/#!/ <bar> filetype dete
 | 
				
			||||||
" DO bullet points
 | 
					" DO bullet points
 | 
				
			||||||
inoremap <C-j> <esc>:exe "norm Ypf lDB\<C-a>"<cr>A
 | 
					inoremap <C-j> <esc>:exe "norm Ypf lDB\<C-a>"<cr>A
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" edit vimrc
 | 
				
			||||||
 | 
					nnoremap <leader>ev :vsplit $MYVIMRC<cr>
 | 
				
			||||||
 | 
					nnoremap <leader>sv :source $MYVIMRC<cr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fun! Start()
 | 
					fun! Start()
 | 
				
			||||||
    " Don't run if: we have commandline arguments, we don't have an empty
 | 
					    " 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"
 | 
					" Run after "doing all the startup stuff"
 | 
				
			||||||
" autocmd VimEnter * call Start()
 | 
					" autocmd VimEnter * call Start()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					augroup file_web
 | 
				
			||||||
" Folding
 | 
						autocmd!
 | 
				
			||||||
nnoremap <C-Tab> :tabn<cr>
 | 
						autocmd FileType html,css,less,javascript,php setlocal foldmethod=indent foldenable
 | 
				
			||||||
nnoremap <C-Tab> :tabn<cr>
 | 
					augroup END
 | 
				
			||||||
nnoremap <C-Tab> :tabn<cr>
 | 
					"
 | 
				
			||||||
nnoremap <C-Tab> :tabn<cr>
 | 
					"
 | 
				
			||||||
nnoremap <C-Tab> :tabn<cr>
 | 
					augroup file_vim
 | 
				
			||||||
au FileType html,css,less,javascript,php setl foldmethod=indent foldenable
 | 
						autocmd!
 | 
				
			||||||
 | 
						autocmd FileType vim setlocal foldmethod=marker foldenable
 | 
				
			||||||
"set es6 files to javascript
 | 
						autocmd FileType vim setlocal foldcolumn=3
 | 
				
			||||||
augroup filetypedetect
 | 
					augroup END
 | 
				
			||||||
 | 
					"
 | 
				
			||||||
 | 
					""set es6 files to javascript
 | 
				
			||||||
 | 
					augroup detectES6
 | 
				
			||||||
 | 
						autocmd!
 | 
				
			||||||
	autocmd BufNew,BufNewFile,BufRead *.es6 :setfiletype javascript
 | 
						autocmd BufNew,BufNewFile,BufRead *.es6 :setfiletype javascript
 | 
				
			||||||
augroup END
 | 
					augroup END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue