161 lines
4.2 KiB
VimL
Executable File
161 lines
4.2 KiB
VimL
Executable File
set nocompatible " Do not use the old vi
|
|
set encoding=utf-8
|
|
|
|
if isdirectory(expand('~/.vim/bundle/Vundle.vim'))
|
|
|
|
"
|
|
" Vundle must be loaded with the following
|
|
" git clone https://github.com/VundleVim/Vundle.vim.git
|
|
" ~/.vim/bundle/Vundle.vim
|
|
" Then use :PluginInstall to load the plugins.
|
|
" In addition, YouCompleteMe needs to be compiled with
|
|
" python ~/.vim/bundle/YouCompleteMe/install.py --clang-completer
|
|
" Other plugins needs to be compiled to.
|
|
"
|
|
"
|
|
" Loads Vundle. See Vundle documentation for details
|
|
"
|
|
filetype off " Turned back on later
|
|
set rtp+=~/.vim/bundle/Vundle.vim
|
|
call vundle#begin()
|
|
|
|
" Plugin loading area
|
|
Plugin 'VundleVim/Vundle.vim'
|
|
|
|
Plugin 'scrooloose/nerdtree'
|
|
Plugin 'vim-airline/vim-airline'
|
|
Plugin 'vim-airline/vim-airline-themes'
|
|
Plugin 'tpope/vim-fugitive'
|
|
Plugin 'dag/vim-fish'
|
|
Plugin 'lervag/vimtex'
|
|
Plugin 'davidhalter/jedi-vim'
|
|
|
|
" Web
|
|
Plugin 'yuezk/vim-js'
|
|
Plugin 'othree/javascript-libraries-syntax.vim'
|
|
Plugin 'maxmellon/vim-jsx-pretty'
|
|
Plugin 'leafgarland/typescript-vim'
|
|
Plugin 'Quramy/tsuquyomi'
|
|
Plugin 'scrooloose/syntastic.git'
|
|
Plugin 'burnettk/vim-angular'
|
|
|
|
" C-like
|
|
Plugin 'Valloric/YouCompleteMe'
|
|
Plugin 'jeaye/color_coded'
|
|
Plugin 'rdnetto/YCM-Generator'
|
|
Plugin 'Stochastica/formatGen'
|
|
|
|
call vundle#end()
|
|
filetype plugin indent on
|
|
|
|
endif
|
|
|
|
" Requires Liberation Mono Powerline. See github.com/powerline/fonts
|
|
if has('gui_running')
|
|
if has("gui_macvim")
|
|
set guifont=MesloLGSDZForPowerline-Regular:h14
|
|
set transparency=15
|
|
else
|
|
set guifont=Meslo\ LG\ S\ DZ\ for\ Powerline\ 18
|
|
set guioptions -=T " Hides GVim toolbar
|
|
set guioptions -=r " Hides GVim scrollbar
|
|
set guioptions -=m " Hides GVim menubar
|
|
endif
|
|
endif
|
|
|
|
" Indentation and line numbers
|
|
set number
|
|
set cursorline
|
|
set incsearch
|
|
"set noexpandtab
|
|
set autoindent
|
|
set copyindent
|
|
set cindent
|
|
"set cinoptions=(0,u0,U0
|
|
set preserveindent
|
|
set softtabstop=2
|
|
set tabstop=2
|
|
set shiftwidth=2
|
|
set backspace=indent,eol,start
|
|
set colorcolumn=80
|
|
|
|
" Interface
|
|
set wildmenu
|
|
set wildmode=longest:full,full
|
|
set background=dark
|
|
set shell=bash
|
|
set ruler
|
|
set visualbell
|
|
|
|
" Show tabs, etc.
|
|
command LcdCurrent lcd %:p:h " Change pwd to current file
|
|
command ClearRegister let regs='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/-"' |
|
|
\ let i=0 | while (i<strlen(regs)) |
|
|
\ exec 'let @'.regs[i].'=""' |
|
|
\ let i=i+1 |
|
|
\ endwhile |
|
|
\ unlet regs
|
|
set cino=N-s " No namespace indent
|
|
|
|
autocmd BufEnter *.h++ :setlocal filetype=cpp
|
|
autocmd BufEnter *.c++ :setlocal filetype=cpp
|
|
autocmd BufEnter *.lytex :setlocal filetype=tex
|
|
|
|
command Astyle %!astyle
|
|
command Latexmk !latexmk % -pdf
|
|
command Xelatex !xelatex % -output-directory=build
|
|
|
|
" Octave
|
|
augroup filetypedetect
|
|
au! BufRead,BufNewFile *.m,*.oct set filetype=octave
|
|
augroup END
|
|
|
|
" Tex
|
|
let g:tex_flavor = "latex" " Make vim treat all .tex files as latex
|
|
let g:tex_indent_items = 0 " Do not indent items
|
|
autocmd FileType tex setlocal
|
|
\ iskeyword=@,48-57,192-255,- " Include dash, exclude underscore
|
|
\ noautoindent
|
|
\ nosmartindent
|
|
\ nopreserveindent
|
|
\ nocopyindent
|
|
let g:vimtex_complete_enabled = 1
|
|
set conceallevel=1
|
|
|
|
" Allows repeating by .
|
|
vnoremap . :norm.<CR>
|
|
|
|
syntax enable
|
|
let g:ycm_autoclose_preview_window_after_completion = 1
|
|
let g:ycm_autoclose_preview_window_after_insertion = 1
|
|
"let g:ycm_server_python_interpreter="/usr/bin/python3"
|
|
"let g:ycm_python_binary_path="/usr/bin/python3"
|
|
let g:ycm_filetype_blacklist = {
|
|
\ 'text': 1
|
|
\}
|
|
let g:color_coded_enabled = 1
|
|
let g:color_coded_filetypes = ['h', 'hh', 'h++', 'hpp',
|
|
\'c', 'cc', 'c++', 'cpp', 'objc']
|
|
let NERDTreeIgnore = ['\.pyc', '\.aux', '\.toc', '\.o', '\.fdb_latexmk', '\.fls']
|
|
" Tex YouCompleteMe interface
|
|
if !exists('g:ycm_semantic_triggers')
|
|
let g:ycm_semantic_triggers = {}
|
|
endif
|
|
au VimEnter * let g:ycm_semantic_triggers.tex=g:vimtex#re#youcompleteme
|
|
|
|
" Syntastic
|
|
let g:syntastic_mode_map = { 'passive_filetypes': ['tex'] }
|
|
|
|
|
|
" Conque
|
|
let g:ConqueTerm_Color = 2 " Always with colour
|
|
let g:ConqueTerm_CloseOnEnd = 1 " Close conque when program stops
|
|
let g:ConqueTerm_StartMessages = 0 " Display warning messages if Conque is configured incorrectly
|
|
|
|
" Airline
|
|
let g:airline_powerline_fonts = 1
|
|
let g:airline#extensions#whitespace#enabled = 0
|
|
|
|
colorscheme amino
|
|
let g:airline_theme='bubblegum'
|