Created
February 19, 2023 17:17
-
-
Save aniquetahir/c650392b38a0e914b318246d50dcdfe3 to your computer and use it in GitHub Desktop.
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 " 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 'gmarik/Vundle.vim' | |
" add all your plugins here (note older versions of Vundle | |
" used Bundle instead of Plugin) | |
Plugin 'tmhedberg/SimpylFold' | |
Plugin 'vim-scripts/indentpython.vim' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'vim-syntastic/syntastic' | |
Plugin 'nvie/vim-flake8' | |
Plugin 'jnurmine/Zenburn' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'jistr/vim-nerdtree-tabs' | |
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'} | |
Plugin 'kien/ctrlp.vim' | |
" ... | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" Enable folding | |
set foldmethod=indent | |
set foldlevel=99 | |
let g:SimpylFold_docstring_preview=1 | |
"Hide pyc files | |
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree | |
" Enable folding with the spacebar | |
nnoremap <space> za | |
"split navigations | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
"python indentation | |
au BufNewFile,BufRead *.py | |
\ set tabstop=4 | |
\ set softtabstop=4 | |
\ set shiftwidth=4 | |
\ set textwidth=79 | |
\ set expandtab | |
\ set autoindent | |
\ set fileformat=unix | |
"flag unnecessary whitespace | |
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ | |
"set character encoding | |
set encoding=utf-8 | |
"autocomplete shortcuts | |
let g:ycm_autoclose_preview_window_after_completion=1 | |
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR> | |
inoremap jk <ESC> | |
set clipboard=unnamedplus | |
"Prettify code | |
let python_highlight_all=1 | |
syntax on | |
colorscheme solarized | |
call togglebg#map("<F5>") | |
"line numbers | |
set nu | |
"python with virtualenv support | |
py << EOF | |
import os | |
import sys | |
if 'VIRTUAL_ENV' in os.environ: | |
project_base_dir = os.environ['VIRTUAL_ENV'] | |
activate_this = os.path.join(project_base_dir, 'bin/activate_this.py') | |
execfile(activate_this, dict(__file__=activate_this)) | |
EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment