diff --git a/vim/after/ftplugin/python.vim b/vim/after/ftplugin/python.vim new file mode 100644 index 0000000..dada743 --- /dev/null +++ b/vim/after/ftplugin/python.vim @@ -0,0 +1,6 @@ +setlocal tabstop=4 +setlocal softtabstop=4 +setlocal shiftwidth=4 +setlocal expandtab +setlocal autoindent +setlocal fileformat=unix diff --git a/vimrc b/vimrc index 7fdfaa6..8b2dc81 100644 --- a/vimrc +++ b/vimrc @@ -48,6 +48,8 @@ if has("unix") || has("mac") map :VundleUpdate 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 O O "[Easy jump into the normal-mode from the insert-mode]" inoremap jj "[To move over parenthesis, brackets, quotes in insert-mode]" -"inoremap kk -"inoremap hh +inoremap kk +inoremap hh "[Easy omni-completion with Ctrl-Space]" -inoremap +"inoremap "[To disable the arrow keys]" -"for prefix in ['i', 'n', 'v'] -"for key in ['', '', '', ''] -"execute prefix . "noremap " . key . " " -"endfor -"endfor +for prefix in ['i', 'n', 'v'] + for key in ['', '', '', ''] + execute prefix . "noremap " . key . " " + 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