vimrc overhaul, switch to jedi-vim for python completion, deactivate arrow keys

This commit is contained in:
lhark 2017-04-27 13:36:45 -04:00
parent bded9cb24c
commit 0f7985c4e3
2 changed files with 24 additions and 20 deletions

View file

@ -0,0 +1,6 @@
setlocal tabstop=4
setlocal softtabstop=4
setlocal shiftwidth=4
setlocal expandtab
setlocal autoindent
setlocal fileformat=unix

38
vimrc
View file

@ -48,6 +48,8 @@ if has("unix") || has("mac")
map <F3> :VundleUpdate<CR> map <F3> :VundleUpdate<CR>
if has("python") if has("python")
Plugin 'klen/python-mode' Plugin 'klen/python-mode'
let g:pymode_rope_lookup_project = 0
let g:pymode_rope = 0
endif endif
if has("ruby") if has("ruby")
Plugin 'terryma/vim-multiple-cursors' Plugin 'terryma/vim-multiple-cursors'
@ -67,10 +69,14 @@ if has("unix") || has("mac")
Plugin 'godlygeek/tabular' Plugin 'godlygeek/tabular'
Plugin 'tikhomirov/vim-glsl' Plugin 'tikhomirov/vim-glsl'
Plugin 'jamessan/vim-gnupg' Plugin 'jamessan/vim-gnupg'
Plugin 'davidhalter/jedi-vim'
Plugin 'petRUShka/vim-opencl' Plugin 'petRUShka/vim-opencl'
Plugin 'Raimondi/delimitMate' Plugin 'Raimondi/delimitMate'
Plugin 'tpope/vim-surround' Plugin 'tpope/vim-surround'
Plugin 'captbaritone/better-indent-support-for-php-with-html' Plugin 'captbaritone/better-indent-support-for-php-with-html'
"[Autodetect indent style of a file]"
let g:detectindent_preferred_indent=4
let g:detectindent_autodetect=1
Plugin 'roryokane/detectindent' Plugin 'roryokane/detectindent'
"[Solarized theme]" "[Solarized theme]"
Plugin 'altercation/vim-colors-solarized' Plugin 'altercation/vim-colors-solarized'
@ -137,16 +143,16 @@ nnoremap <leader>O O<Esc>
"[Easy jump into the normal-mode from the insert-mode]" "[Easy jump into the normal-mode from the insert-mode]"
inoremap jj <Esc> inoremap jj <Esc>
"[To move over parenthesis, brackets, quotes in insert-mode]" "[To move over parenthesis, brackets, quotes in insert-mode]"
"inoremap kk <Right> inoremap kk <Right>
"inoremap hh <Left> inoremap hh <Left>
"[Easy omni-completion with Ctrl-Space]" "[Easy omni-completion with Ctrl-Space]"
inoremap <C-Space> <C-X><C-O> "inoremap <C-Space> <C-X><C-O>
"[To disable the arrow keys]" "[To disable the arrow keys]"
"for prefix in ['i', 'n', 'v'] for prefix in ['i', 'n', 'v']
"for key in ['<Up>', '<Down>', '<Left>', '<Right>'] for key in ['<Up>', '<Down>', '<Left>', '<Right>']
"execute prefix . "noremap " . key . " <Nop>" execute prefix . "noremap " . key . " <Nop>"
"endfor endfor
"endfor endfor
"[Threshold for reporting number of lines changed]" "[Threshold for reporting number of lines changed]"
set report=0 set report=0
"[Show command in the last line of the screen]" "[Show command in the last line of the screen]"
@ -163,6 +169,7 @@ set laststatus=2
"[Define StatusLine]" "[Define StatusLine]"
set statusline="" set statusline=""
set statusline+=%F%m%r%h%w set statusline+=%F%m%r%h%w
set wrapscan
set statusline+=%=%y set statusline+=%=%y
set statusline+=\ [%{&ff}] set statusline+=\ [%{&ff}]
set statusline+=\ Line:%l/%L set statusline+=\ Line:%l/%L
@ -187,7 +194,7 @@ set background=dark
set ttyfast set ttyfast
set showmode set showmode
set tabline="" set tabline=""
set cmdheight=1 " set cmdheight=1 : default
set showtabline=0 set showtabline=0
set colorcolumn="" set colorcolumn=""
set nocursorcolumn set nocursorcolumn
@ -259,12 +266,10 @@ set expandtab
set autoindent set autoindent
set copyindent set copyindent
set smartindent set smartindent
set cinwords="" set cinwords=except,finally,def,class,with,do,if,elif,else,for,while,try,switch
set modelines=1 set modelines=1
set shiftwidth=4 set shiftwidth=4
set softtabstop=4 set softtabstop=4
set cinwords+=except,finally,def,class,with,do
set cinwords+=if,elif,else,for,while,try,switch
"[TextWidth settings]" "[TextWidth settings]"
set textwidth=0 set textwidth=0
"[Settings of line numbers]" "[Settings of line numbers]"
@ -279,6 +284,7 @@ set hlsearch
set incsearch set incsearch
set smartcase set smartcase
set ignorecase set ignorecase
set wrapscan
"[When on, the ":substitute" flag 'g' is default on]" "[When on, the ":substitute" flag 'g' is default on]"
set nogdefault set nogdefault
"[Language settings]" "[Language settings]"
@ -321,7 +327,6 @@ set hidden
set switchbuf=useopen,usetab,newtab set switchbuf=useopen,usetab,newtab
"[Wrap settings]" "[Wrap settings]"
set wrap set wrap
set wrapscan
set whichwrap=<,>,[,] set whichwrap=<,>,[,]
set nolinebreak set nolinebreak
"[Encoding/FileType settings]" "[Encoding/FileType settings]"
@ -440,10 +445,3 @@ function! ShowModeInStatusLine()
endif endif
return g:showMode return g:showMode
endfunction endfunction
""[Autodetect indent style of a file]"
if has("autocmd")
augroup DetectIndent
autocmd!
autocmd BufReadPost * DetectIndent
augroup END autocmd BufReadPost * call AutoDetectTabs()
endif