Home Index

1. Python

2. Vim

Python / Vim /

Install Python Vim Autocompletion


  • curl -fLo ~/.vim/autoload/plug.vim --create-dirs

  • Reload .vimrc and :PlugInstall to install plugins.

vi ~/.vimrc

"----------------------------------- Color Scheme ----------------------------------------------" " :set all ... list of available options that can be set " :help group-name " :help cterm-colors "----------------------------------------------------------------------------------------------" " White Black " Yellow LightYellow " Brown DarkYellow " Gray LightGray DarkGray " Grey LightGrey DarkGrey " Blue LightBlue DarkBlue " Green LightGreen DarkGreen " Cyan LightCyan DarkCyan " Red LightRed DarkRed " Magenta LightMagenta DarkMagenta "-----------------------------------------------------------------------------------------------" syntax on autocmd BufRead *.cql set syntax=cql highlight DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red highlight LineNr ctermfg=Grey ctermbg=0 highlight Comment ctermfg=Gray highlight Constant ctermfg=Cyan "any constant highlight String ctermfg=Magenta "a string constant highlight Character ctermfg=Red "a character constant: 'c', '\n' highlight Number ctermfg=Red "a number constant: 234, 0xff highlight Boolean ctermfg=Red "a boolean constant: TRUE, false highlight Float ctermfg=Red "a floating point constant: 2.3e10 highlight Identifier ctermfg=Cyan "any variable name highlight Function ctermfg=LightRed "function name (also: methods for classes) highlight Statement ctermfg=Yellow "any statement highlight Conditional ctermfg=Green "if, then, else, endif, switch, etc. highlight Repeat ctermfg=Green "for, do, while, etc. highlight Label ctermfg=Green "case, default, etc. highlight Operator ctermfg=Green "sizeof", "+", "*", etc. highlight Keyword ctermfg=LightRed highlight Exception ctermfg=Green "try, catch, throw highlight Type ctermfg=Green "int, long, char, etc. highlight StorageClass ctermfg=LightBlue "static, register, volatile, etc. highlight Structure ctermfg=Green "struct, union, enum, etc. highlight Typedef ctermfg=Green "A typedef "-----------------------------------------------------------------------------------------------" set autoindent " Always set autoindenting on set backspace=2 " Make backspace work like most other apps set cursorline set expandtab " Converting tabs to spaces set hlsearch set incsearch " Incremental (emacs-style) search set laststatus=2 set nocompatible " Get all the VIM features set noet ci pi sts=0 sw=2 ts=4 set nowrap set number " Numbering set ruler " show the cursor position all the time set shiftwidth=4 " > and < move block by 2 spaces in visual mode set showcmd " Show current vim command in status bar set showfulltag " Get function usage help automatically set showmatch " Show matching parentheses/brackets set showmode " Show current vim mode set tabstop=4 softtabstop=4 shiftwidth=4 expandtab set textwidth=160 " Use the traditional textwidth set vb t_vb= " kill the beeps! (visible bell) set wildmenu " use a scrollable menu for filename completions set wildmode=list:longest,full "-----------------------------------------------------------------------------------------------" filetype off " required "-----------------------------------------------------------------------------------------------" call plug#begin('~/.vim/plugged') Plug 'shmup/vim-sql-syntax' Plug 'godlygeek/tabular' Plug 'plasticboy/vim-markdown' Plug 'derekwyatt/vim-scala' Plug 'scrooloose/syntastic' Plug 'Valloric/YouCompleteMe', { 'do': './' } call plug#end() set statusline+=%#warningmsg# set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%* let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 0 let g:syntastic_check_on_wq = 0 let g:syntastic_aggregate_errors = 1 let g:syntastic_scala_checkers = ['scalac', 'scalastyle'] let g:syntastic_css_checkers = ['stylelint'] let g:syntastic_scala_scalastyle_jar = '/usr/local/Cellar/scalastyle/0.8.0/libexec/scalastyle_2.11-0.8.0-batch.jar' let g:syntastic_scala_scalastyle_config_file = '/usr/local/etc/scalastyle_config.xml' "-----------------------------------------------------------------------------------------------" map ,todo A#TODO: KevinDuraj^[0j map ,ee oopen(FILE, ">>/tmp/kduraj.txt"); print __FILE__ . ":" . (caller(0))[3] . ":" . __LINE__ . "\n"; close(FILE);<ESC>o<ESC> map ,dd o<C-W>use Data::Dumper;<CR>print STDERR __FILE__ . ":" . (caller(0))[3] . ":" . __LINE__ . "\n" . Dumper( $$ );<ESC>o<ESC>