|
|
@ -1,76 +1,59 @@
|
|
|
|
" Begin Plugin section
|
|
|
|
" Begin Plugin section
|
|
|
|
if ! filereadable(expand('~/.local/share/nvim/autoload/plug.vim'))
|
|
|
|
if ! filereadable(expand('~/.local/share/nvim/autoload/plug.vim')) echo
|
|
|
|
echo "Downloading junegunn/vim-plug to manage plugins..."
|
|
|
|
"Downloading junegunn/vim-plug to manage plugins..." silent !mkdir -p
|
|
|
|
silent !mkdir -p ~/.local/share/nvim/autoload/
|
|
|
|
~/.local/share/nvim/autoload/ silent !curl
|
|
|
|
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.local/share/nvim/autoload/plug.vim
|
|
|
|
"https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" >
|
|
|
|
autocmd VimEnter * PlugInstall
|
|
|
|
~/.local/share/nvim/autoload/plug.vim autocmd VimEnter * PlugInstall endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call plug#begin('~/.local/share/nvim/plugged') Plug 'lervag/vimtex' , {'for' :
|
|
|
|
call plug#begin('~/.local/share/nvim/plugged')
|
|
|
|
'tex'} " Tex library for autocompletion Plug 'donRaphaco/neotex' , {'for':
|
|
|
|
Plug 'lervag/vimtex' , {'for' : 'tex'} " Tex library for autocompletion
|
|
|
|
'tex'} " Asynchronous pdf rendering Plug 'scrooloose/nerdtree' " Filetree Plug
|
|
|
|
Plug 'donRaphaco/neotex' , {'for': 'tex'} " Asynchronous pdf rendering
|
|
|
|
'majutsushi/tagbar' " Show tags Plug 'airblade/vim-gitgutter' " Git Upgrades
|
|
|
|
Plug 'scrooloose/nerdtree' " Filetree
|
|
|
|
|
|
|
|
Plug 'majutsushi/tagbar' " Show tags
|
|
|
|
|
|
|
|
Plug 'airblade/vim-gitgutter' " Git Upgrades
|
|
|
|
|
|
|
|
"Plug 'FredKSchott/CoVim' "Use vim together
|
|
|
|
"Plug 'FredKSchott/CoVim' "Use vim together
|
|
|
|
Plug 'qpkorr/vim-renamer' " Bulk renamer
|
|
|
|
Plug 'qpkorr/vim-renamer' " Bulk renamer Plug 'sirver/ultisnips' " Snippets
|
|
|
|
Plug 'sirver/ultisnips' " Snippets
|
|
|
|
Plug 'uiiaoo/java-syntax.vim' , {'for': 'java'} " Better syntax highlight for
|
|
|
|
Plug 'uiiaoo/java-syntax.vim' , {'for': 'java'} " Better syntax highlight for java than default
|
|
|
|
java than default Plug 'frazrepo/vim-rainbow' " Colorized matching brackets
|
|
|
|
Plug 'frazrepo/vim-rainbow' " Colorized matching brackets
|
|
|
|
Plug 'junegunn/fzf.vim' " Quickly jump files using fzf Plug
|
|
|
|
Plug 'junegunn/fzf.vim' " Quickly jump files using fzf
|
|
|
|
'ryanoasis/vim-devicons' " Enable Icons for vim Plug 'rrethy/vim-hexokinase' ,
|
|
|
|
Plug 'ryanoasis/vim-devicons' " Enable Icons for vim
|
|
|
|
{'do': 'make hexokinase'} " Color Preview Plug 'tomasiser/vim-code-dark' "
|
|
|
|
Plug 'rrethy/vim-hexokinase' , {'do': 'make hexokinase'} " Color Preview
|
|
|
|
adding colorscheme Plug 'godlygeek/tabular' " Tabularizing things Plug
|
|
|
|
Plug 'tomasiser/vim-code-dark' " adding colorscheme
|
|
|
|
'plasticboy/vim-markdown' , {'for': 'md'} " Helps for markdown call plug#end()
|
|
|
|
Plug 'godlygeek/tabular' " Tabularizing things
|
|
|
|
|
|
|
|
Plug 'plasticboy/vim-markdown' , {'for': 'md'} " Helps for markdown
|
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Rainbow
|
|
|
|
" Rainbow
|
|
|
|
au FileType java,c,cpp,py,h call rainbow#load()
|
|
|
|
au FileType java,c,cpp,py,h call rainbow#load()
|
|
|
|
|
|
|
|
|
|
|
|
" You complete me
|
|
|
|
" You complete me
|
|
|
|
let g:ycm_global_ycm_extra_conf = '/home/tiynger/.config/nvim/ycm_extra_conf.py'
|
|
|
|
let g:ycm_global_ycm_extra_conf =
|
|
|
|
let g:ycm_semantic_triggers = {
|
|
|
|
'/home/tiynger/.config/nvim/ycm_extra_conf.py' let g:ycm_semantic_triggers = {
|
|
|
|
\ 'tex' : ['{']
|
|
|
|
\ 'tex' : ['{'] \} if !exists('g:ycm_semantic_triggers') let
|
|
|
|
\}
|
|
|
|
g:ycm_semantic_triggers = {} endif let g:ycm_semantic_triggers.tex =
|
|
|
|
if !exists('g:ycm_semantic_triggers')
|
|
|
|
g:vimtex#re#youcompleteme
|
|
|
|
let g:ycm_semantic_triggers = {}
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
let g:ycm_semantic_triggers.tex = g:vimtex#re#youcompleteme
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Tagbar
|
|
|
|
" Tagbar
|
|
|
|
map <F3> :TagbarToggle<CR>
|
|
|
|
map <F3> :TagbarToggle<CR>
|
|
|
|
|
|
|
|
|
|
|
|
" Nerdtree
|
|
|
|
" Nerdtree
|
|
|
|
map <F2> :NERDTreeToggle<CR>
|
|
|
|
map <F2> :NERDTreeToggle<CR> autocmd bufenter * if (winnr("$") == 1 &&
|
|
|
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
|
|
|
exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif let
|
|
|
|
let g:NERDTreeWinPos = "left"
|
|
|
|
g:NERDTreeWinPos = "left"
|
|
|
|
|
|
|
|
|
|
|
|
" Neotex
|
|
|
|
" Neotex
|
|
|
|
let g:neotex_enabled = 2
|
|
|
|
let g:neotex_enabled = 2
|
|
|
|
|
|
|
|
|
|
|
|
" CoVim
|
|
|
|
" CoVim
|
|
|
|
let CoVim_default_name = "TiynGER"
|
|
|
|
let CoVim_default_name = "TiynGER" let CoVim_default_port = "7000"
|
|
|
|
let CoVim_default_port = "7000"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Hexokinase
|
|
|
|
" Hexokinase
|
|
|
|
let g:Hexokinase_refreshEvents = ['InsertLeave']
|
|
|
|
let g:Hexokinase_refreshEvents = ['InsertLeave'] let
|
|
|
|
let g:Hexokinase_optInPatterns = [
|
|
|
|
g:Hexokinase_optInPatterns = [ \ 'full_hex', \ 'triple_hex', \ 'rgb', \
|
|
|
|
\ 'full_hex',
|
|
|
|
'rgba', \ 'hsl', \ 'hsla', \ 'color_names' \]
|
|
|
|
\ 'triple_hex',
|
|
|
|
|
|
|
|
\ 'rgb',
|
|
|
|
let g:Hexokinase_highlighters = ['backgroundfull'] autocmd VimEnter *
|
|
|
|
\ 'rgba',
|
|
|
|
HexokinaseTurnOn
|
|
|
|
\ 'hsl',
|
|
|
|
|
|
|
|
\ 'hsla',
|
|
|
|
|
|
|
|
\ 'color_names'
|
|
|
|
|
|
|
|
\]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let g:Hexokinase_highlighters = ['backgroundfull']
|
|
|
|
|
|
|
|
autocmd VimEnter * HexokinaseTurnOn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Vim-Mardown
|
|
|
|
" Vim-Mardown
|
|
|
|
let g:vim_markdown_folding_disabled=1
|
|
|
|
let g:vim_markdown_folding_disabled=1 let
|
|
|
|
let g:vim_markdown_no_default_key_mappings=1
|
|
|
|
g:vim_markdown_no_default_key_mappings=1
|
|
|
|
|
|
|
|
|
|
|
|
" End Plugin section
|
|
|
|
" End Plugin section
|
|
|
|
|
|
|
|
|
|
|
@ -78,15 +61,13 @@ let mapleader =","
|
|
|
|
|
|
|
|
|
|
|
|
set go=a
|
|
|
|
set go=a
|
|
|
|
" Enable mouse for all modes
|
|
|
|
" Enable mouse for all modes
|
|
|
|
set mouse=a
|
|
|
|
set mouse=a set clipboard+=unnamedplus
|
|
|
|
set clipboard+=unnamedplus
|
|
|
|
|
|
|
|
" Enable command completion
|
|
|
|
" Enable command completion
|
|
|
|
set wildmode=longest,list,full
|
|
|
|
set wildmode=longest,list,full
|
|
|
|
" Setting Tab-length
|
|
|
|
" Setting Tab-length
|
|
|
|
set expandtab
|
|
|
|
set expandtab set softtabstop=4 set shiftwidth=4
|
|
|
|
set softtabstop=4
|
|
|
|
" Splits open at the bottom and right, which is non-retarded, unlike vim
|
|
|
|
set shiftwidth=4
|
|
|
|
" defaults.
|
|
|
|
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
|
|
|
|
|
|
|
|
set splitbelow splitright
|
|
|
|
set splitbelow splitright
|
|
|
|
" Disable case sensitive matching
|
|
|
|
" Disable case sensitive matching
|
|
|
|
set ignorecase
|
|
|
|
set ignorecase
|
|
|
@ -103,19 +84,15 @@ set encoding=utf-8
|
|
|
|
" Show relative numbers on left side
|
|
|
|
" Show relative numbers on left side
|
|
|
|
set number relativenumber
|
|
|
|
set number relativenumber
|
|
|
|
" Speedup vim with long lines
|
|
|
|
" Speedup vim with long lines
|
|
|
|
set ttyfast
|
|
|
|
set ttyfast set lazyredraw
|
|
|
|
set lazyredraw
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" enable persistent undo
|
|
|
|
" enable persistent undo
|
|
|
|
if has('persistent_undo')
|
|
|
|
if has('persistent_undo') set undofile set undodir=$XDG_CACHE_HOME/vim/undo
|
|
|
|
set undofile
|
|
|
|
|
|
|
|
set undodir=$XDG_CACHE_HOME/vim/undo
|
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
" Colorscheme
|
|
|
|
" Colorscheme
|
|
|
|
colorscheme codedark
|
|
|
|
colorscheme codedark highlight CursorLine ctermbg=Yellow cterm=bold
|
|
|
|
highlight CursorLine ctermbg=Yellow cterm=bold guibg=#1b1b1b
|
|
|
|
guibg=#1b1b1b highlight CursorColumn ctermbg=Yellow cterm=bold guibg=#1b1b1b
|
|
|
|
highlight CursorColumn ctermbg=Yellow cterm=bold guibg=#1b1b1b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Center screen on Insertion
|
|
|
|
" Center screen on Insertion
|
|
|
|
autocmd InsertEnter * norm zz
|
|
|
|
autocmd InsertEnter * norm zz
|
|
|
@ -126,24 +103,21 @@ autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
|
|
|
" Clean LaTex build files
|
|
|
|
" Clean LaTex build files
|
|
|
|
autocmd VimLeave *.tex !texclear %
|
|
|
|
autocmd VimLeave *.tex !texclear %
|
|
|
|
" Read files correctly
|
|
|
|
" Read files correctly
|
|
|
|
autocmd BufRead,BufNewFile *.tex set filetype=tex
|
|
|
|
autocmd BufRead,BufNewFile *.tex set filetype=tex autocmd BufRead,BufNewFile
|
|
|
|
autocmd BufRead,BufNewFile *.h set filetype=c
|
|
|
|
*.h set filetype=c
|
|
|
|
|
|
|
|
|
|
|
|
" Mapping Dictionaries
|
|
|
|
" Mapping Dictionaries
|
|
|
|
map <F5> :setlocal spell! spelllang=de_de<CR>
|
|
|
|
map <F5> :setlocal spell! spelllang=de_de<CR> map <F6> :set
|
|
|
|
map <F6> :set spelllang=en_us<CR>
|
|
|
|
spelllang=en_us<CR>
|
|
|
|
" Compiler for languages
|
|
|
|
" Compiler for languages
|
|
|
|
map <leader>c :w! \| !compiler <c-r>%<CR>
|
|
|
|
map <leader>c :w! \| !compiler <c-r>%<CR>
|
|
|
|
" Open corresponding file (pdf/html/...)
|
|
|
|
" Open corresponding file (pdf/html/...)
|
|
|
|
map <leader>p :!opout <c-r>%<CR><CR>
|
|
|
|
map <leader>p :!opout <c-r>%<CR><CR>
|
|
|
|
" Shortcut for split navigation
|
|
|
|
" Shortcut for split navigation
|
|
|
|
map <C-h> <C-w>h
|
|
|
|
map <C-h> <C-w>h map <C-j> <C-w>j map <C-k> <C-w>k map <C-l> <C-w>l
|
|
|
|
map <C-j> <C-w>j
|
|
|
|
" Copy selected text to system clipboard (requires gvim/nvim/vim-x11
|
|
|
|
map <C-k> <C-w>k
|
|
|
|
" installed):
|
|
|
|
map <C-l> <C-w>l
|
|
|
|
map <C-p> "+P vnoremap <C-c> "+y
|
|
|
|
" Copy selected text to system clipboard (requires gvim/nvim/vim-x11 installed):
|
|
|
|
|
|
|
|
map <C-p> "+P
|
|
|
|
|
|
|
|
vnoremap <C-c> "+y
|
|
|
|
|
|
|
|
" Save file as sudo on files that require root permission
|
|
|
|
" Save file as sudo on files that require root permission
|
|
|
|
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
|
|
|
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
|
|
|
" Alias for replacing
|
|
|
|
" Alias for replacing
|
|
|
@ -151,12 +125,12 @@ nnoremap S :%s//gI<Left><Left><Left>
|
|
|
|
|
|
|
|
|
|
|
|
" Start Formatting section
|
|
|
|
" Start Formatting section
|
|
|
|
|
|
|
|
|
|
|
|
autocmd FileType java,python,c,tex,latex noremap <F8> gggqG
|
|
|
|
noremap <F8> gggqG
|
|
|
|
|
|
|
|
|
|
|
|
au FileType python setlocal formatprg=autopep8\ -
|
|
|
|
au FileType python setlocal formatprg=autopep8\ -
|
|
|
|
|
|
|
|
|
|
|
|
au FileType java setlocal formatprg=google-java-format\ -
|
|
|
|
au FileType java setlocal formatprg=google-java-format\ - autocmd FileType
|
|
|
|
autocmd FileType java setlocal shiftwidth=2 softtabstop=2
|
|
|
|
java setlocal shiftwidth=2 softtabstop=2
|
|
|
|
|
|
|
|
|
|
|
|
au FileType c setlocal formatprg=astyle\ --mode=c
|
|
|
|
au FileType c setlocal formatprg=astyle\ --mode=c
|
|
|
|
|
|
|
|
|
|
|
|