82 lines
2.3 KiB
VimL
82 lines
2.3 KiB
VimL
set nocompatible " be iMproved, required
|
|
filetype off " required
|
|
|
|
" for fish, this is needed ..
|
|
set shell=/bin/bash
|
|
|
|
" set the runtime path to include Vundle and initialize
|
|
set rtp+=~/.vim/bundle/Vundle.vim
|
|
call vundle#begin()
|
|
Plugin 'VundleVim/Vundle.vim'
|
|
""" Keep Plugin commands between vundle#begin/end.
|
|
" git
|
|
Plugin 'tpope/vim-fugitive'
|
|
" autocomplete
|
|
Plugin 'ycm-core/YouCompleteMe'
|
|
"python sytax checker
|
|
Plugin 'nvie/vim-flake8'
|
|
"Plugin 'vim-scripts/Pydiction'
|
|
Plugin 'vim-scripts/indentpython.vim'
|
|
Plugin 'scrooloose/syntastic'
|
|
""" All of your Plugins must be added before the following line
|
|
call vundle#end() " required
|
|
|
|
"filetype plugin indent on " required
|
|
|
|
" Put your non-Plugin stuff after this line
|
|
" autocomplete
|
|
let g:ycm_autoclose_preview_window_after_completion=1
|
|
" line numbering
|
|
set number
|
|
set hlsearch
|
|
syntax on
|
|
set backspace=indent,eol,start
|
|
set background=dark
|
|
set showcmd
|
|
|
|
"omnicomplete
|
|
autocmd FileType python set omnifunc=pythoncomplete#Complete
|
|
|
|
"------------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
|
|
|
|
" For full syntax highlighting:
|
|
let python_highlight_all=1
|
|
syntax on
|
|
|
|
" Keep indentation level from previous line:
|
|
autocmd FileType python set autoindent
|
|
|
|
" make backspaces more powerfull
|
|
set backspace=indent,eol,start
|
|
|
|
|
|
"Folding based on indentation:
|
|
autocmd FileType python set foldmethod=indent
|
|
"use space to open folds
|
|
nnoremap <space> za
|
|
"----------Stop python PEP 8 stuff--------------
|