sudo dnf install ncurses-devel
git clone https://github.com/vim/vim.git
cd vim
./configure --enable-pythoninterp=yes --enable-python3interp=yes --with-python-command=/usr/bin/python --with-python3-command=/usr/bin/python3.6 --disable-gpm
make
sudo make install
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vi ~/.vimrc
set nocompatible " required
filetype off " required
set encoding=utf-8
" 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 'vim-syntastic/syntastic'
Plugin 'nvie/vim-flake8'
Plugin 'tmhedberg/SimpylFold'
Bundle 'Valloric/YouCompleteMe'
Plugin 'morhetz/gruvbox'
" Plugin 'Yggdroot/indentLine'
Plugin 'dense-analysis/ale'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" enable folding with spacebar
set foldmethod=indent
set foldlevel=99
nnoremap <space> za
let g:SimpylFold_docstring_preview=1
set tabstop=4
set softtabstop=4
set shiftwidth=4
"set textwidth=119
set expandtab
set fileformat=unix
set mouse=
set hlsearch
highlight BadWhitespace ctermbg=red guibg=darkred
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
" turn on line numbering
" set nu
" dont auto-indent comments. very annoying when copy/pasting
filetype indent off
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
set pastetoggle=<F3>
" youcompleteme tweaks
let g:ycm_autoclose_preview_window_after_completion=1
" ctrl-down
nnoremap <C-Down> :YcmCompleter GoToDefinitionElseDeclaration<CR>
" ctrl-left move to before-jump
nnoremap <C-Left> <C-O>
" ctrl-right move back to jump
nnoremap <C-Right> <C-I>
"let g:ycm_log_level = 'debug'
let python_highlight_all=1
syntax on
set background=dark
colorscheme gruvbox
"set t_ut=
set viminfo='10,\"100,:20,%,n~/.viminfo
function! ResCur()
if line("'\"") <= line("$")
normal! g`"
return 1
endif
endfunction
augroup resCur
autocmd!
autocmd BufWinEnter * call ResCur()
augroup END
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
set foldlevelstart=20
" let g:indentLine_char = '⦙'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_sign_error = '✘'
let g:ale_sign_warning = '⚠'
let g:ale_lint_on_text_changed = 'never'
autocmd Filetype json let g:indentLine_enabled = 0
In vim:
:PluginInstall
CentOS:
dnf install clang cmake make gcc python3-devel
cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer
MacOS:
brew install cmake macvim python mono go nodejs
(re)open the terminal to make sure you're using brew's python
cd ~/.vim/bundle/YouCompleteMe
python3 install.py --all
Some additional settings for gvim on windows:
colorscheme desert
language messages en
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
filetype indent off
copy C:\Program Files (x86)\Vim_vimrc to the desktop, edit the file and copy the new file over the original