Last active
August 14, 2018 15:16
-
-
Save thiagodasilva/1951316e862ec49ea2b1ae04f0c2dc91 to your computer and use it in GitHub Desktop.
vimrc geared towards python development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
"code completion" | |
"checkout docs to complete installation" | |
"Plugin 'Valloric/YouCompleteMe' | |
Plugin 'davidhalter/jedi-vim' | |
"The NERDTree is a file system explorer for the Vim editor." | |
Plugin 'scrooloose/nerdtree' | |
"syntax checker" | |
Plugin 'vim-syntastic/syntastic' | |
"fuzzy file search" | |
"checkout docs to complete installation" | |
Plugin 'wincent/Command-T' | |
"status line" | |
Plugin 'vim-airline/vim-airline' | |
"flake 8" | |
Plugin 'nvie/vim-flake8' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
" NERDTree ----------------------------- | |
" toggle nerdtree display | |
map <F3> :NERDTreeToggle<CR> | |
" open nerdtree with the current file selected | |
nmap ,t :NERDTreeFind<CR> | |
" don;t show these file types | |
let NERDTreeIgnore = ['\.pyc$', '\.pyo$'] | |
set number | |
" Command to move among tabs in Konsole-style | |
nnoremap H gT | |
nnoremap L gt | |
"YCM" | |
"let g:ycm_autoclose_preview_window_after_completion=1 | |
"map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR> | |
"Jedi-VIM | |
let g:jedi#use_tabs_not_buffers = 1 | |
"------------Start Python PEP 8 stuff---------------- | |
" Number of spaces that a pre-existing tab is equal to. | |
au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=4 | |
"spaces for indents | |
au BufRead,BufNewFile *.py,*pyw set shiftwidth=4 | |
au BufRead,BufNewFile *.py,*.pyw set expandtab | |
au BufRead,BufNewFile *.py set softtabstop=4 | |
" Use the below highlight group when displaying bad whitespace is desired. | |
highlight BadWhitespace ctermbg=red guibg=red | |
" Display tabs at the beginning of a line in Python mode as bad. | |
au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/ | |
" Make trailing whitespace be flagged as bad. | |
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ | |
" Wrap text after a certain number of characters | |
au BufRead,BufNewFile *.py,*.pyw, set textwidth=100 | |
" Use UNIX (\n) line endings. | |
au BufNewFile *.py,*.pyw,*.c,*.h set fileformat=unix | |
" Set the default file encoding to UTF-8: | |
set encoding=utf-8 | |
let python_highlight_all=1 | |
syntax on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment