added json support, various vimrc changes

This commit is contained in:
Vasili Svirydau
2014-03-18 14:33:04 -07:00
parent 6eab2b8720
commit a085224e09
3 changed files with 28 additions and 17 deletions

3
.gitmodules vendored
View File

@@ -52,3 +52,6 @@
[submodule "bundle/gocode.vim"] [submodule "bundle/gocode.vim"]
path = bundle/gocode.vim path = bundle/gocode.vim
url = https://github.com/Blackrush/vim-gocode.git url = https://github.com/Blackrush/vim-gocode.git
[submodule "bundle/json.vim"]
path = bundle/json.vim
url = https://github.com/leshill/vim-json.git

1
bundle/json.vim Submodule

Submodule bundle/json.vim added at 3029554ee1

41
vimrc
View File

@@ -5,17 +5,17 @@ set encoding=utf-8
call pathogen#infect() call pathogen#infect()
syntax on "enable syntax hightlighting syntax on "enable syntax hightlighting
set nocompatible
set modelines=0
set visualbell
set laststatus=2 "show 2 status lines
set number "show line numbers
set autoindent "enable autoindent set autoindent "enable autoindent
set hidden "enable multiple dirty buffers
set encoding=utf-8 "set encoding
set autoread "automatically reload files set autoread "automatically reload files
set wildmode=full set encoding=utf-8 "set encoding
set hidden "enable multiple dirty buffers
set laststatus=2 "show 2 status lines
set modelines=0
set nocompatible
set number "show line numbers
set visualbell
set wildmenu "show autocomplete menu set wildmenu "show autocomplete menu
set wildmode=full
colorscheme hybrid colorscheme hybrid
@@ -30,22 +30,28 @@ endfu
if has("autocmd") if has("autocmd")
filetype plugin indent on filetype plugin indent on
"Autoexit to normal mode after 15 seconds of inactivity augroup InsertTimer
autocmd CursorHoldI * stopinsert au!
autocmd InsertEnter * let updaterestore=&updatetime | set updatetime=15000 "Autoexit to normal mode after 15 seconds of inactivity
autocmd InsertLeave * let &updatetime=updaterestore autocmd CursorHoldI * stopinsert
"Automatically reload VIMRC file after saving autocmd InsertEnter * let updaterestore=&updatetime | set updatetime=15000
autocmd bufwritepost .vimrc source $MYVIMRC autocmd InsertLeave * let &updatetime=updaterestore
autocmd bufwritepost _vimrc source $MYVIMRC augroup END
augroup vimrc
"Automatically reload VIMRC file after saving
au!
autocmd bufwritepost $MYVIMRC source $MYVIMRC
augroup END
"Mappings for diff mode "Mappings for diff mode
autocmd filterwritepre * if &diff | map <leader>{ :diffget \\2<cr>| endif autocmd filterwritepre * if &diff | map <leader>{ :diffget \\2<cr>| endif
autocmd filterwritepre * if &diff | map <leader>} :diffget \\3<cr>| endif autocmd filterwritepre * if &diff | map <leader>} :diffget \\3<cr>| endif
"Custom mappings
augroup javascript augroup javascript
autocmd! "Custom mappings
au!
autocmd BufRead *.js nmap <leader>f* :call JsFunctionLookup()<cr>zz autocmd BufRead *.js nmap <leader>f* :call JsFunctionLookup()<cr>zz
augroup END augroup END
endif endif
@@ -130,3 +136,4 @@ nmap <leader>d :bd<cr>
set wildignore+=*/Deploy/*,*/node_modules/*,*/build/*,*/lib/* set wildignore+=*/Deploy/*,*/node_modules/*,*/build/*,*/lib/*
set completeopt=longest,menu,menuone set completeopt=longest,menu,menuone