169 lines
4.5 KiB
VimL
169 lines
4.5 KiB
VimL
![]() |
set rtp+=~/.config/nvim/plugged/Vundle.vim
|
|||
|
|
|||
|
call plug#begin('~/.config/nvim/plugged')
|
|||
|
Plug 'VundleVim/Vundle.vim'
|
|||
|
Plug 'ycm-core/YouCompleteMe', {'for': ['cpp', 'hpp', 'c', 'h']}
|
|||
|
Plug 'lervag/vimtex', {'for': 'tex'}
|
|||
|
Plug 'honza/vim-snippets'
|
|||
|
Plug 'sirver/ultisnips', {'for': 'tex'}
|
|||
|
Plug 'xuhdev/vim-latex-live-preview', {'for': 'tex'}
|
|||
|
Plug 'morhetz/gruvbox'
|
|||
|
Plug 'jiangmiao/auto-pairs'
|
|||
|
Plug 'joom/vim-commentary'
|
|||
|
Plug 'vimplugin/project.vim'
|
|||
|
Plug 'mattn/emmet-vim', { 'for': 'html' }
|
|||
|
Plug 'christoomey/vim-tmux-navigator'
|
|||
|
" Plug 'rhysd/vim-clang-format'
|
|||
|
Plug 'tpope/vim-surround'
|
|||
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
|||
|
|
|||
|
Plug 'qpkorr/vim-bufkill'
|
|||
|
|
|||
|
Plug 'vim-airline/vim-airline'
|
|||
|
Plug 'vim-airline/vim-airline-themes'
|
|||
|
|
|||
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
|||
|
" Plug 'kyazdani42/nvim-tree.lua'
|
|||
|
" Plug 'kyazdani42/nvim-web-devicons' " optional, for file icons
|
|||
|
call plug#end()
|
|||
|
|
|||
|
let g:ycm_filetype_blacklist = {
|
|||
|
\ 'tex': 1,
|
|||
|
\}
|
|||
|
|
|||
|
let g:ycm_auto_trigger=0
|
|||
|
set completeopt-=preview
|
|||
|
|
|||
|
" set spell spelllang=ru
|
|||
|
|
|||
|
set nocompatible " be iMproved, required
|
|||
|
filetype off " required
|
|||
|
|
|||
|
set tabstop=2
|
|||
|
set softtabstop=2
|
|||
|
set shiftwidth=2
|
|||
|
set expandtab
|
|||
|
|
|||
|
set number
|
|||
|
" source ~/.config/nvim/plugged/restore_view.vim
|
|||
|
" source ~/.config/nvim/plugged/google.vim
|
|||
|
set foldmethod=syntax
|
|||
|
|
|||
|
map <C-n> :NERDTreeToggle<CR>
|
|||
|
" set viewoptions=cursor,folds,slash,unix
|
|||
|
|
|||
|
filetype on
|
|||
|
" filetype plugin indent on
|
|||
|
|
|||
|
let g:tex_flavor='latex'
|
|||
|
let g:vimtex_view_method='zathura'
|
|||
|
let g:vimtex_quickfix_mode=0
|
|||
|
set conceallevel=1
|
|||
|
let g:tex_conceal='abdmg'
|
|||
|
|
|||
|
let g:UltiSnipsSnippetDirectories = ['~/.config/nvim/UltiSnips', 'UltiSnips']
|
|||
|
let g:UltiSnipsExpandTrigger = '<tab>'
|
|||
|
let g:UltiSnipsJumpForwardTrigger = '<tab>'
|
|||
|
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
|
|||
|
|
|||
|
let g:livepreview_previewer = 'zathura'
|
|||
|
let g:livepreview_use_biber = 1
|
|||
|
let g:livepreview_cursorhold_recompile = 1
|
|||
|
|
|||
|
nnoremap <C-J> <C-W><C-J>
|
|||
|
nnoremap <C-K> <C-W><C-K>
|
|||
|
nnoremap <C-L> <C-W><C-L>
|
|||
|
nnoremap <C-H> <C-W><C-H>
|
|||
|
|
|||
|
au FocusGained,BufEnter * :checktime
|
|||
|
au CursorHold,CursorHoldI * checktime
|
|||
|
au CursorHold * checktime
|
|||
|
set autoread
|
|||
|
" nnoremap <F8> :!make <CR>
|
|||
|
" nnoremap <F9> :!./a <input.txt >output.txt <CR>
|
|||
|
|
|||
|
set colorcolumn=100
|
|||
|
|
|||
|
let g:gruvbox_contrast_dark = 'soft'
|
|||
|
|
|||
|
colorscheme gruvbox
|
|||
|
set background=dark
|
|||
|
|
|||
|
" autocmd FileType cpp set commentstring=//\ %s
|
|||
|
|
|||
|
" map <C-\> :Commentary<CR>
|
|||
|
|
|||
|
inoremap <C-v> <ESC>"+pa
|
|||
|
vnoremap <C-c> "+y
|
|||
|
vnoremap <C-d> "+d
|
|||
|
" vnoremap <C-A-l> :ClangFormat<CR>:w<CR>
|
|||
|
" nnoremap <C-A-l> :ClangFormat<CR>:w<CR>
|
|||
|
vnoremap <C-A-l> :YcmCompleter Format<CR>:w<CR>
|
|||
|
nnoremap <C-A-l> :YcmCompleter Format<CR>:w<CR>
|
|||
|
|
|||
|
" imap jk <Esc>
|
|||
|
" imap kj <Esc>
|
|||
|
" imap ло <Esc>
|
|||
|
" imap ол <Esc>
|
|||
|
|
|||
|
nnoremap <nowait> ] ]]
|
|||
|
nnoremap <nowait> [ [[
|
|||
|
|
|||
|
set langmap=ёйцукенгшщзхъфывапролджэячсмитьбю;`qwertyuiop[]asdfghjkl\;'zxcvbnm\\,.,ЙЦУКЕHГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<>
|
|||
|
|
|||
|
" let g:user_emmet_expandabbr_key='<Tab>'
|
|||
|
" imap <expr> <tab> emmet#expandAbbrIntelligent("\<tab>")
|
|||
|
|
|||
|
"set keymap=russian-jcukenwin
|
|||
|
"set iminsert=0
|
|||
|
"
|
|||
|
"imap <F12> <C-^>
|
|||
|
"cmap <F12> <C-^>
|
|||
|
|
|||
|
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
|
|||
|
"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
|
|||
|
"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
|
|||
|
if (empty($TMUX))
|
|||
|
if (has("nvim"))
|
|||
|
"For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
|
|||
|
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
|||
|
endif
|
|||
|
"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
|
|||
|
"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
|
|||
|
" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
|
|||
|
if (has("termguicolors"))
|
|||
|
set termguicolors
|
|||
|
endif
|
|||
|
endif
|
|||
|
|
|||
|
hi Normal guibg=NONE ctermbg=NONE
|
|||
|
|
|||
|
map <F4> zc
|
|||
|
map <F5> zo
|
|||
|
|
|||
|
" match ExtraWhitespace '/\s\+$'
|
|||
|
" highlight ExtraWhitespace ctermbg=red
|
|||
|
highlight ExtraWhitespace guifg=white
|
|||
|
match ExtraWhitespace /\s\+$/
|
|||
|
|
|||
|
set list listchars=trail:·
|
|||
|
set nofoldenable
|
|||
|
|
|||
|
set mouse=n
|
|||
|
|
|||
|
map gn :bn<cr>
|
|||
|
map gp :bp<cr>
|
|||
|
map gw :BD<cr>
|
|||
|
|
|||
|
map gd :YcmCompleter GoToDefinition<cr>
|
|||
|
map gf :YcmCompleter FixIt<cr>
|
|||
|
|
|||
|
map <F4> :YcmCompleter RefactorRename
|
|||
|
|
|||
|
autocmd FileType cpp setlocal commentstring=//\ %s
|
|||
|
map <C-_> :Commentary<cr>j
|
|||
|
|
|||
|
let g:airline_powerline_fonts=1
|
|||
|
" let g:airline#extensions#tabline#enabled = 1
|
|||
|
" set linespace=0
|