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