mirror of https://github.com/einverne/dotfiles.git
				
				
			
				 3 changed files with 61 additions and 34 deletions
			
			
		@ -0,0 +1,36 @@ | 
				
			|||||||
 | 
					" vim map setting | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Treat long lines as break lines (useful when moving around in them) | 
				
			||||||
 | 
					map j gj | 
				
			||||||
 | 
					map k gk | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" fast saving | 
				
			||||||
 | 
					nmap <leader>w :w!<cr> | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" smart way to move between windows | 
				
			||||||
 | 
					map <C-j> <C-W>j | 
				
			||||||
 | 
					map <C-k> <C-W>k | 
				
			||||||
 | 
					map <C-h> <C-W>h | 
				
			||||||
 | 
					map <C-l> <C-W>l | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Useful mappings for managin tabs | 
				
			||||||
 | 
					map <leader>tn :tabnew<cr> | 
				
			||||||
 | 
					map <leader>to :tabonly<cr> | 
				
			||||||
 | 
					map <leader>tc :tabclose<cr> | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" visual mode copy and paste to system clipboard | 
				
			||||||
 | 
					vmap <C-c> "+y | 
				
			||||||
 | 
					vmap <C-x> "+c | 
				
			||||||
 | 
					vmap <C-v> "+p | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function! Xml() | 
				
			||||||
 | 
						set filetype=xml | 
				
			||||||
 | 
						:%s/></>\r</g 	"把><替换成>回车< | 
				
			||||||
 | 
						:normal gg=G<cr> | 
				
			||||||
 | 
					endfunction | 
				
			||||||
 | 
					map <leader>xml :call Xml() | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" plugin map setting | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Normal mode F2 to call NERDTree | 
				
			||||||
 | 
					nmap <F2> :NERDTreeToggle<cr> | 
				
			||||||
@ -0,0 +1,23 @@ | 
				
			|||||||
 | 
					" Plugin settings | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" plasticboy/vim-markdown | 
				
			||||||
 | 
					" disable folding | 
				
			||||||
 | 
					let g:vim_markdown_folding_disabled=1 | 
				
			||||||
 | 
					" Highlight YAML frontmatter as used by Jekyll | 
				
			||||||
 | 
					let g:vim_markdown_frontmatter=1 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" intend guides | 
				
			||||||
 | 
					let g:indent_guides_enable_on_vim_startup = 1 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" jedi-vim plugin config | 
				
			||||||
 | 
					let g:jedi#completions_command = "<C-N>" | 
				
			||||||
 | 
					let g:jedi#popup_on_dot = 0 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" syntastic setting | 
				
			||||||
 | 
					set statusline+=%#warningmsg# | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let g:syntastic_always_populate_loc_list = 1 | 
				
			||||||
 | 
					let g:syntastic_auto_loc_list = 1 | 
				
			||||||
 | 
					let g:syntastic_check_on_open = 1 | 
				
			||||||
 | 
					let g:syntastic_check_on_wq = 0 | 
				
			||||||
 | 
					
 | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue