vimrc - частично неработает подсветка синтаксиса

В этом файле будет .vimrc + решение некоторых проблем, связанных с установкой плагинов.

"General
filetype plugin indent on
set nocompatible
set hidden
syntax enable

"Splits
set splitbelow
set splitright

"Encoding
scriptencoding utf-8
set encoding=utf-8

"Tabs
set smarttab
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4

"Visual
set number 
set wrap linebreak nolist
set showtabline=0
set cursorline


call plug#begin('~/.vim/plugged')
    Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
    "Plug 'neoclide/coc.nvim', {'branch': 'release'}
    Plug 'ycm-core/YouCompleteMe'
    Plug 'elzr/vim-json'
    Plug 'luochen1990/rainbow'
    Plug 'godlygeek/tabular' 
    Plug 'plasticboy/vim-markdown'
    Plug 'tmsvg/pear-tree'
    Plug 'ErichDonGubler/vim-sublime-monokai'
    Plug 'Hovushka/vim-monokai-tasty'    
    Plug 'lifepillar/vim-solarized8'    
    Plug 'octol/vim-cpp-enhanced-highlight'
    Plug 'terryma/vim-multiple-cursors'    
    Plug 'majutsushi/tagbar'
call plug#end()

colorscheme solarized8

let g:cpp_class_scope_highlight = 1
let g:cpp_member_variable_highlight = 1
let g:cpp_class_decl_highlight = 1
let g:cpp_posix_standard = 1
let g:cpp_experimental_simple_template_highlight = 1
let g:cpp_experimental_template_highlight = 1
let g:cpp_concepts_highlight = 1
let g:cpp_no_function_highlight = 1
let c_no_curly_error=1

"tagbar
nmap <F8> :TagbarToggle<CR>
" Default mapping multiple cursor
let g:multi_cursor_start_word_key      = '<C-n>'
let g:multi_cursor_select_all_word_key = '<A-n>'
let g:multi_cursor_start_key           = 'g<C-n>'
let g:multi_cursor_select_all_key      = 'g<A-n>'
let g:multi_cursor_next_key            = '<C-n>'
let g:multi_cursor_prev_key            = '<C-p>'
let g:multi_cursor_skip_key            = '<C-x>'
let g:multi_cursor_quit_key            = '<Esc>'

"Pear Tree
    let g:pear_tree_repeatable_expand = 0
    let g:pear_tree_smart_openers = 1
    let g:pear_tree_smart_closers = 1
    let g:pear_tree_smart_backspace = 1

"NERDTree
    let g:webdevicons_conceal_nerdtree_brackets=0
    map <C-x> :NERDTreeToggle<CR>

Устанавливаем все командой

:PlugInstall

tagbar

После установки плагина tagbar в терминале прописать

sudo apt-get install exuberant-ctags

YouCompleteMe

YouCompleteMe/third_party/ycmd/build.py does not exist

git submodule update —init —recursive

coc.nvim

Для установки coc.nvim

:CocInstall coc-clangd

[coc.nvim] Unable to load global extension at .config/coc/extensions/node_modules/coc-ccls: main file ./lib/extension.js not found, you may need to build the project.

solution: ln -s node_modules/ws/lib lib

Last updated

Was this helpful?