2019-05-29 08:13:03 +00:00
|
|
|
|
" vim: fdm=marker
|
|
|
|
|
|
|
|
|
|
"{{{ Клавиши Leader и LocalLeader
|
|
|
|
|
let mapleader="\<Space>"
|
|
|
|
|
let maplocalleader=","
|
|
|
|
|
|
|
|
|
|
" Таймауты для ввода комбинаций, использующих клавиши Leader и LocalLeader
|
|
|
|
|
set timeout timeoutlen=5000 ttimeoutlen=100
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
" https://github.com/tpope/vim-pathogen
|
|
|
|
|
call pathogen#infect()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" https://github.com/junegunn/vim-plug
|
|
|
|
|
" Менеджер плагинов "
|
|
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
|
|
2019-06-13 11:17:39 +00:00
|
|
|
|
" https://github.com/skywind3000/asyncrun.vim
|
|
|
|
|
" Запуск асинхронных команд "
|
|
|
|
|
Plug 'skywind3000/asyncrun.vim'
|
|
|
|
|
|
2021-12-25 06:53:59 +00:00
|
|
|
|
" https://github.com/mhinz/vim-startify
|
|
|
|
|
" Стартовый экран
|
|
|
|
|
Plug 'mhinz/vim-startify'
|
|
|
|
|
|
2019-05-29 08:13:03 +00:00
|
|
|
|
" https://github.com/lyokha/vim-xkbswitch
|
|
|
|
|
" Автоматическое переключение раскладки клавиатуры в режиме вставки "
|
|
|
|
|
Plug 'lyokha/vim-xkbswitch'
|
|
|
|
|
|
2021-06-01 04:08:47 +00:00
|
|
|
|
" https://github.com/srcery-colors/srcery-vim
|
|
|
|
|
" Тема srcery
|
|
|
|
|
Plug 'srcery-colors/srcery-vim'
|
|
|
|
|
|
2019-05-29 08:13:03 +00:00
|
|
|
|
" https://github.com/itchyny/lightline.vim
|
|
|
|
|
" Настраиваемая строка состояния "
|
|
|
|
|
" https://github.com/taohexxx/lightline-buffer
|
|
|
|
|
" Строка с названиями буферов "
|
|
|
|
|
Plug 'itchyny/lightline.vim' | Plug 'taohexxx/lightline-buffer'
|
|
|
|
|
|
2021-12-25 06:53:59 +00:00
|
|
|
|
" https://github.com/Cheeto836/vim-rainbow
|
2019-05-29 08:13:03 +00:00
|
|
|
|
" Разноцветные скобки "
|
2021-12-25 06:53:59 +00:00
|
|
|
|
Plug 'Cheeto836/vim-rainbow'
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
|
|
|
|
" https://github.com/ntpeters/vim-better-whitespace
|
|
|
|
|
" Подсветка лишних пробельных символов "
|
|
|
|
|
Plug 'ntpeters/vim-better-whitespace'
|
|
|
|
|
|
|
|
|
|
" https://github.com/wincent/terminus
|
|
|
|
|
" Улучшенная поддержка терминала "
|
|
|
|
|
Plug 'wincent/terminus'
|
|
|
|
|
|
|
|
|
|
" https://www.vim.org/scripts/script.php?script_id=231
|
|
|
|
|
" Tab для логической разметки, Space для выравнивания "
|
|
|
|
|
Plug 'dpc/vim-smarttabs'
|
|
|
|
|
|
|
|
|
|
" https://github.com/ctrlpvim/ctrlp.vim
|
|
|
|
|
" Поиск файлов и буферов "
|
|
|
|
|
Plug 'ctrlpvim/ctrlp.vim'
|
|
|
|
|
|
|
|
|
|
" https://github.com/easymotion/vim-easymotion
|
|
|
|
|
" Быстрая навигация "
|
|
|
|
|
Plug 'easymotion/vim-easymotion'
|
|
|
|
|
|
|
|
|
|
" https://github.com/haya14busa/incsearch.vim
|
|
|
|
|
" Поиск "
|
|
|
|
|
Plug 'haya14busa/incsearch.vim' | Plug 'haya14busa/incsearch-easymotion.vim'
|
|
|
|
|
|
2021-12-25 06:53:59 +00:00
|
|
|
|
" https://github.com/mihaifm/bufstop
|
|
|
|
|
Plug 'mihaifm/bufstop'
|
|
|
|
|
|
2019-05-29 08:13:03 +00:00
|
|
|
|
" https://github.com/moll/vim-bbye
|
|
|
|
|
" Удаление буферов с сохранением расположения окон "
|
|
|
|
|
Plug 'moll/vim-bbye'
|
|
|
|
|
|
|
|
|
|
" https://github.com/sstallion/vim-wildignore
|
|
|
|
|
" Чтение масок файлов из файлов wildignore и suffixes "
|
|
|
|
|
Plug 'sstallion/vim-wildignore'
|
|
|
|
|
|
|
|
|
|
" https://github.com/tpope/vim-fugitive
|
|
|
|
|
" Git "
|
2020-05-16 09:11:23 +00:00
|
|
|
|
" Plug 'tpope/vim-fugitive'
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
|
|
|
|
" https://github.com/airblade/vim-gitgutter
|
|
|
|
|
" Отличия от Git в левой колонке "
|
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
|
|
|
|
|
|
|
|
|
" https://github.com/neomake/neomake
|
|
|
|
|
" Проверка синтаксиса в фоновом режиме "
|
|
|
|
|
Plug 'neomake/neomake'
|
|
|
|
|
|
|
|
|
|
" https://github.com/stephpy/vim-yaml
|
|
|
|
|
" YAML "
|
|
|
|
|
Plug 'stephpy/vim-yaml'
|
|
|
|
|
|
|
|
|
|
" https://github.com/plasticboy/vim-markdown
|
|
|
|
|
" Markdown "
|
|
|
|
|
Plug 'plasticboy/vim-markdown'
|
|
|
|
|
|
2019-06-02 10:03:49 +00:00
|
|
|
|
"https://github.com/habamax/vim-asciidoctor
|
2019-06-13 11:17:39 +00:00
|
|
|
|
" AsciiDoctor "
|
2019-06-02 10:03:49 +00:00
|
|
|
|
Plug 'habamax/vim-asciidoctor'
|
|
|
|
|
|
2019-05-29 08:13:03 +00:00
|
|
|
|
" https://github.com/SirVer/ultisnips
|
|
|
|
|
" Вставка фрагментов кода "
|
|
|
|
|
Plug 'sirver/ultisnips'
|
|
|
|
|
|
|
|
|
|
" https://github.com/honza/vim-snippets
|
|
|
|
|
" Библиотека фрагментов кода "
|
|
|
|
|
Plug 'honza/vim-snippets'
|
|
|
|
|
|
|
|
|
|
" https://github.com/aklt/plantuml-syntax
|
|
|
|
|
" Plantuml "
|
|
|
|
|
Plug 'aklt/plantuml-syntax'
|
|
|
|
|
|
|
|
|
|
" https://github.com/dhruvasagar/vim-table-mode
|
|
|
|
|
" Создание таблиц "
|
|
|
|
|
Plug 'dhruvasagar/vim-table-mode'
|
|
|
|
|
|
|
|
|
|
" https://github.com/junegunn/vim-easy-align
|
|
|
|
|
" Выравнивание строк "
|
|
|
|
|
Plug 'junegunn/vim-easy-align'
|
|
|
|
|
|
2020-03-30 06:39:30 +00:00
|
|
|
|
" https://github.com/henry4k/vim-fontzoom
|
|
|
|
|
" Изменение размера шрифта "
|
|
|
|
|
Plug 'henry4k/vim-fontzoom'
|
|
|
|
|
|
2019-06-13 11:17:39 +00:00
|
|
|
|
" https://dmitryfrank.com/projects/vimprj
|
|
|
|
|
" Опции для отдельных проектов "
|
|
|
|
|
Plug 'elnull/vim-dfutil' | Plug 'elnull/vimprj'
|
|
|
|
|
|
2022-06-17 08:49:36 +00:00
|
|
|
|
" https://github.com/ilyachur/cmake4vim
|
2019-06-13 11:17:39 +00:00
|
|
|
|
" CMake "
|
2022-06-17 08:49:36 +00:00
|
|
|
|
Plug 'ilyachur/cmake4vim'
|
2019-06-13 11:17:39 +00:00
|
|
|
|
|
2020-05-16 09:11:23 +00:00
|
|
|
|
Plug 'lervag/vimtex'
|
|
|
|
|
Plug 'xuhdev/vim-latex-live-preview'
|
|
|
|
|
|
2021-12-25 06:53:59 +00:00
|
|
|
|
" https://github.com/jez/vim-superman
|
|
|
|
|
" MAN "
|
|
|
|
|
Plug 'jez/vim-superman'
|
|
|
|
|
|
2022-04-28 05:18:32 +00:00
|
|
|
|
" https://github.com/kergoth/vim-bitbake
|
|
|
|
|
" Bitbake "
|
|
|
|
|
Plug 'kergoth/vim-bitbake'
|
|
|
|
|
|
2020-05-16 08:33:59 +00:00
|
|
|
|
" https://github.com/python-mode/python-mode "
|
|
|
|
|
" Python "
|
|
|
|
|
Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }
|
|
|
|
|
|
2020-12-21 08:11:33 +00:00
|
|
|
|
" https://github.com/itspriddle/vim-shellcheck "
|
|
|
|
|
" Shell "
|
|
|
|
|
Plug 'itspriddle/vim-shellcheck'
|
|
|
|
|
|
2021-12-22 11:38:34 +00:00
|
|
|
|
Plug 'rhysd/vim-grammarous'
|
2020-12-21 08:11:33 +00:00
|
|
|
|
|
2019-05-29 08:13:03 +00:00
|
|
|
|
" Перечисление плагинов заканчивается здесь "
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"{{{ Базовые настройки
|
|
|
|
|
" Включена подсветка синтаксиса "
|
2020-11-28 08:01:54 +00:00
|
|
|
|
" Plug устанавливает свои значения, нужно явно переопределить после plug#end "
|
2019-05-29 08:13:03 +00:00
|
|
|
|
syntax on
|
|
|
|
|
filetype plugin indent on
|
|
|
|
|
|
2021-05-18 04:57:29 +00:00
|
|
|
|
" Выбор движка для регулярных выражений
|
|
|
|
|
autocmd FileType ruby,tex set regexpengine=1
|
|
|
|
|
|
2019-05-29 08:13:03 +00:00
|
|
|
|
" Отключен режим совместимости "
|
|
|
|
|
set nocompatible
|
|
|
|
|
|
|
|
|
|
" Проверка изменения файла другой программой "
|
|
|
|
|
set autoread
|
|
|
|
|
|
|
|
|
|
" Автоматическая запись перед make, внешними командами и т.п. "
|
|
|
|
|
set autowrite
|
|
|
|
|
|
|
|
|
|
" Показывать парные скобки "
|
|
|
|
|
set showmatch
|
|
|
|
|
|
|
|
|
|
" Размер табуляции "
|
|
|
|
|
set tabstop=4
|
|
|
|
|
|
|
|
|
|
" Размер сдвига при нажатии на клавиши << и >> "
|
|
|
|
|
set shiftwidth=4
|
|
|
|
|
|
|
|
|
|
" Количество пробелов, на которое будет заменена табуляция "
|
|
|
|
|
set softtabstop=4
|
|
|
|
|
|
|
|
|
|
" Не заменять <TAB> на пробелы "
|
|
|
|
|
set noexpandtab
|
|
|
|
|
|
|
|
|
|
" Визуальный перенос строк "
|
|
|
|
|
set wrap
|
|
|
|
|
|
|
|
|
|
" Визуальный перенос строк по словам, а не по буквам "
|
|
|
|
|
set linebreak
|
|
|
|
|
|
|
|
|
|
" Визуальный перенос строки с учётом отступов "
|
|
|
|
|
set breakindent
|
|
|
|
|
|
|
|
|
|
" Подсветка выражения, которое ищется в тексте "
|
|
|
|
|
set hlsearch
|
|
|
|
|
|
|
|
|
|
" Переход на найденный текст в процессе набора строки "
|
|
|
|
|
set incsearch
|
|
|
|
|
|
|
|
|
|
" Не останавливать поиск при достижении конца файла "
|
|
|
|
|
set wrapscan
|
|
|
|
|
|
|
|
|
|
" Игнорировать регистр букв при поиске, если в шаблоне нет заглавных букв "
|
|
|
|
|
set smartcase
|
|
|
|
|
|
|
|
|
|
" Копирует отступ от предыдущей строки "
|
|
|
|
|
set autoindent
|
|
|
|
|
|
|
|
|
|
" Автоматическая расстановка отступов "
|
|
|
|
|
set smartindent
|
|
|
|
|
|
2020-03-30 06:39:30 +00:00
|
|
|
|
" По умолчанию не сворачивать "
|
|
|
|
|
set nofoldenable
|
|
|
|
|
|
2020-06-06 09:22:58 +00:00
|
|
|
|
" Сворачивание согласно синтаксису тормозит, нужно использовать что-то другое "
|
|
|
|
|
set foldmethod=marker
|
2020-03-30 06:39:30 +00:00
|
|
|
|
|
2019-05-29 08:13:03 +00:00
|
|
|
|
" Кодировка внутри Vim "
|
|
|
|
|
set encoding=utf-8
|
|
|
|
|
|
|
|
|
|
" Кодировка терминала "
|
|
|
|
|
set termencoding=utf-8
|
|
|
|
|
|
|
|
|
|
" Кодировка для сохраняемого файла "
|
|
|
|
|
set fileencoding=utf-8
|
|
|
|
|
|
|
|
|
|
" Список предполагаемых кодировок в порядке предпочтения "
|
|
|
|
|
set fileencodings=utf8,koi8r,cp1251,cp866,latin1,ucs-2le
|
|
|
|
|
|
|
|
|
|
" Включаем мышку даже в текстовом режиме "
|
|
|
|
|
" (без этого символы табуляции раскладываются в кучу пробелов) "
|
|
|
|
|
set mouse=a
|
|
|
|
|
|
|
|
|
|
" Модель поведения правой кнопки мыши "
|
|
|
|
|
set mousemodel=popup
|
|
|
|
|
|
|
|
|
|
" Тип переноса строк "
|
|
|
|
|
set fileformat=unix
|
|
|
|
|
|
|
|
|
|
" В графическом режиме: убрать меню "
|
|
|
|
|
set guioptions-=m
|
|
|
|
|
|
|
|
|
|
" В графическом режиме: убрать панель инструментов "
|
|
|
|
|
set guioptions-=T
|
|
|
|
|
|
|
|
|
|
" В графическом режиме: убрать прокрутку справа "
|
|
|
|
|
set guioptions-=r
|
|
|
|
|
|
|
|
|
|
" В графическом режиме: убрать прокрутку слева "
|
|
|
|
|
set guioptions-=L
|
|
|
|
|
|
|
|
|
|
" В графическом режиме: отключить графические вкладки "
|
|
|
|
|
set guioptions-=e
|
|
|
|
|
|
|
|
|
|
" Шрифт в графическом режиме "
|
2022-01-04 12:21:07 +00:00
|
|
|
|
if has('gui_running') && !has('nvim')
|
|
|
|
|
set guifont=Iosevka\ Fixed\ SS08\ 10
|
|
|
|
|
endif
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
|
|
|
|
" Количество отображаемых строк над/под курсором "
|
|
|
|
|
set scrolloff=6
|
|
|
|
|
|
|
|
|
|
" Количество отображаемых колонок слева/справа от курсора "
|
|
|
|
|
set sidescrolloff=5
|
|
|
|
|
|
|
|
|
|
" Нумерация строк включена "
|
|
|
|
|
set number
|
|
|
|
|
|
|
|
|
|
" Нумерация строк абсолютная "
|
|
|
|
|
set nornu
|
|
|
|
|
|
|
|
|
|
" Использовать меню в статусной строке "
|
|
|
|
|
set wildmenu
|
|
|
|
|
|
|
|
|
|
" Клавиша для переключения между пунктами меню "
|
|
|
|
|
set wildcharm=<Tab>
|
|
|
|
|
|
|
|
|
|
" Всегда отображать статусную строку для каждого окна "
|
|
|
|
|
set laststatus=2
|
|
|
|
|
|
|
|
|
|
" Отображение набираемой в данный момент команды в правом нижнем углу экрана "
|
|
|
|
|
set showcmd
|
|
|
|
|
|
|
|
|
|
" Пробельные символы "
|
|
|
|
|
set listchars=tab:>·,trail:~,extends:>,precedes:<,space:␣
|
|
|
|
|
|
|
|
|
|
" Включение отображения пробельных символов "
|
|
|
|
|
set list
|
|
|
|
|
|
|
|
|
|
" Копирование выравнивания от предыдущей строки "
|
|
|
|
|
set copyindent
|
|
|
|
|
"}}}
|
|
|
|
|
|
2021-12-25 06:53:59 +00:00
|
|
|
|
map <leader>b :Bufstop<CR> " get a visual on the buffers
|
|
|
|
|
map <leader>w :BufstopPreview<CR> " switch files by moving inside the window
|
|
|
|
|
map <leader>a :BufstopModeFast<CR> " a command for quick switching
|
|
|
|
|
map <C-tab> :BufstopBack<CR>
|
|
|
|
|
map <S-tab> :BufstopForward<CR>
|
|
|
|
|
let g:BufstopAutoSpeedToggle = 1 " now I can press ,3,3,3 to cycle the last 3 buffers
|
|
|
|
|
let g:BufstopSorting = "none"
|
|
|
|
|
|
|
|
|
|
|
2019-05-29 08:13:03 +00:00
|
|
|
|
"{{{ Раскладки клавиатуры
|
|
|
|
|
let g:XkbSwitchEnabled = 1
|
|
|
|
|
let g:XkbSwitchNLayout = 'us'
|
|
|
|
|
let g:XkbSwitchIMappings = ['ru']
|
|
|
|
|
let g:XkbSwitchIMappingsTr = {
|
|
|
|
|
\ 'ru':
|
|
|
|
|
\ {'<': 'qwertyuiop[]asdfghjkl;''zxcvbnm,.`/'.
|
|
|
|
|
\ 'QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>?~@#$^&|',
|
|
|
|
|
\ '>': 'йцукенгшщзхъфывапролджэячсмитьбюё.'.
|
|
|
|
|
\ 'ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,Ё"№;:?/'}
|
|
|
|
|
\ }
|
|
|
|
|
let g:XkbSwitchSkipIMappings = {
|
|
|
|
|
\ 'c' : ['.', '>', ':', '{<CR>', '/*', '/*<CR>'],
|
|
|
|
|
\ 'cpp' : ['.', '>', ':', '{<CR>', '/*', '/*<CR>'],
|
|
|
|
|
\ 'markdown' : ['[', ']', '{', '}', "'", '"', '`', '~']
|
|
|
|
|
\ }
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{ Цветовая схема kolor https://github.com/zeis/vim-kolor/
|
|
|
|
|
" Enable italic. Default: 1
|
2021-06-01 04:08:47 +00:00
|
|
|
|
" let g:kolor_italic=0
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
|
|
|
|
" Enable bold. Default: 1
|
2021-06-01 04:08:47 +00:00
|
|
|
|
" let g:kolor_bold=1
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
|
|
|
|
" Enable underline. Default: 0
|
2021-06-01 04:08:47 +00:00
|
|
|
|
" let g:kolor_underlined=0
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
|
|
|
|
" Gray 'MatchParen' color. Default: 0
|
2021-06-01 04:08:47 +00:00
|
|
|
|
" let g:kolor_alternative_matchparen=0
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
|
|
|
|
" White foreground 'MatchParen' color that might work better with some terminals. Default: 0
|
2021-06-01 04:08:47 +00:00
|
|
|
|
" let g:kolor_inverted_matchparen=0
|
|
|
|
|
|
|
|
|
|
" colorscheme kolor
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"{{{ Цветовая схема srcery https://github.com/srcery-colors/srcery-vim
|
|
|
|
|
" Enables italic text.
|
|
|
|
|
" let g:srcery_italic=0
|
|
|
|
|
|
|
|
|
|
" Enables bold text.
|
|
|
|
|
let g:srcery_bold=1
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
2021-06-01 04:08:47 +00:00
|
|
|
|
" Enables underlined text.
|
|
|
|
|
let g:srcery_underline=1
|
|
|
|
|
|
|
|
|
|
" Enables undercurled text.
|
|
|
|
|
let g:srcery_undercurl=1
|
|
|
|
|
|
|
|
|
|
" Highlight search matches using inverse colors.
|
|
|
|
|
let g:srcery_inverse_matches=0
|
|
|
|
|
|
|
|
|
|
" When enabled will highlight matching delimiters using inverse colors. (:DoMatchParen)
|
|
|
|
|
let g:srcery_inverse_match_paren=0
|
|
|
|
|
|
|
|
|
|
colorscheme srcery
|
|
|
|
|
"}}}
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
2021-06-01 04:08:47 +00:00
|
|
|
|
"{{{
|
|
|
|
|
"highlight SpecialKey guifg=#585858 guibg=NONE gui=none
|
|
|
|
|
"highlight NonText guifg=#585858 guibg=#2e2d2b gui=none
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
2021-06-01 04:08:47 +00:00
|
|
|
|
"if &t_Co <= 256
|
|
|
|
|
" highlight SpecialKey ctermfg=240 ctermbg=none cterm=none
|
|
|
|
|
" highlight NonText ctermfg=240 ctermbg=235 cterm=none
|
|
|
|
|
"endif
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
|
|
|
|
" Разноцветные скобки для определённых типов файлов
|
|
|
|
|
autocmd FileType bash,python,vim,html,c,cpp,objc,objcpp call rainbow#load()
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{ Подсветка лишних пробельных символов
|
|
|
|
|
let g:better_whitespace_enabled=1
|
|
|
|
|
let g:strip_whitelines_at_eof=1
|
|
|
|
|
let g:strip_whitespace_on_save=0
|
2020-05-16 08:33:59 +00:00
|
|
|
|
autocmd FileType javascript,c,cpp,java,html,python,ruby,tex,vim EnableStripWhitespaceOnSave
|
2019-05-29 08:13:03 +00:00
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{1 Статусная строка
|
|
|
|
|
" Всегда отображать статусную строку для каждого окна "
|
|
|
|
|
set laststatus=2
|
|
|
|
|
|
|
|
|
|
" Всегда отображать перечень буферов "
|
|
|
|
|
set showtabline=2
|
|
|
|
|
" \ [ 'fugitive', 'readonly', 'filename', 'modified' ] ],
|
|
|
|
|
" \ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}',
|
|
|
|
|
" \ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())',
|
|
|
|
|
|
|
|
|
|
" Lightline
|
|
|
|
|
let g:lightline = {
|
|
|
|
|
\ 'colorscheme': 'wombat',
|
|
|
|
|
\ 'active': {
|
|
|
|
|
\ 'left': [ [ 'filetype' ],
|
|
|
|
|
\ [ 'mode', 'paste' ],
|
|
|
|
|
\ [ 'readonly', 'filename', 'modified' ] ],
|
|
|
|
|
\ 'right': [ [ 'character', 'lineinfo', 'percent' ], [ 'fileformat', 'fileencoding' ], [ 'neomake_errors', 'neomake_warnings' ] ]
|
|
|
|
|
\ },
|
|
|
|
|
\ 'tabline': {
|
|
|
|
|
\ 'left': [ [ 'bufferinfo' ],
|
|
|
|
|
\ [ 'separator' ],
|
|
|
|
|
\ [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ],
|
|
|
|
|
\ 'right': [ [ 'close' ], ],
|
|
|
|
|
\ 'separator': { 'left': '|', 'right': '|' },
|
|
|
|
|
\ },
|
|
|
|
|
\ 'component': {
|
|
|
|
|
\ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}',
|
|
|
|
|
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
|
|
|
|
|
\ 'character': '%04B',
|
|
|
|
|
\ 'separator': '|',
|
2021-05-17 07:17:51 +00:00
|
|
|
|
\ 'lineinfo': '%3l:%-2v',
|
2019-05-29 08:13:03 +00:00
|
|
|
|
\ },
|
|
|
|
|
\ 'component_function': {
|
|
|
|
|
\ 'mode': 'LightlineMode',
|
|
|
|
|
\ 'bufferinfo': 'lightline#buffer#bufferinfo',
|
|
|
|
|
\ },
|
|
|
|
|
\ 'component_visible_condition': {
|
|
|
|
|
\ 'readonly': '(&filetype!="help"&& &readonly)',
|
|
|
|
|
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))',
|
|
|
|
|
\ 'neomake_errors': '(exists(":Neomake") && ((get(neomake#statusline#QflistCounts(), "E", 0) + get(neomake#statusline#LoclistCounts(), "E", 0)) > 0)',
|
|
|
|
|
\ 'neomake_warnings': '(exists(":Neomake") && ((get(neomake#statusline#QflistCounts(), "W", 0) + get(neomake#statusline#LoclistCounts(), "W", 0)) > 0)',
|
|
|
|
|
\ 'character': '1'
|
|
|
|
|
\ },
|
|
|
|
|
\ 'component_expand': {
|
|
|
|
|
\ 'buffercurrent': 'lightline#buffer#buffercurrent',
|
|
|
|
|
\ 'bufferbefore': 'lightline#buffer#bufferbefore',
|
|
|
|
|
\ 'bufferafter': 'lightline#buffer#bufferafter',
|
|
|
|
|
\ 'neomake_errors': 'LightLineNeomakeErrors',
|
|
|
|
|
\ 'neomake_warnings': 'LightLineNeomakeWarnings',
|
|
|
|
|
\ },
|
|
|
|
|
\ 'component_type': {
|
|
|
|
|
\ 'buffercurrent': 'tabsel',
|
|
|
|
|
\ 'bufferbefore': 'raw',
|
|
|
|
|
\ 'bufferafter': 'raw',
|
|
|
|
|
\ },
|
|
|
|
|
\ 'separator': { 'left': '', 'right': '' },
|
|
|
|
|
\ 'subseparator': { 'left': '|', 'right': '|' },
|
|
|
|
|
\ 'tabline_separator': { 'left': '', 'right': '' },
|
|
|
|
|
\ 'tabline_subseparator': { 'left': '|', 'right': '|' },
|
|
|
|
|
\ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function! LightlineMode()
|
|
|
|
|
return expand('%:t') ==# '__Tagbar__' ? 'Tagbar':
|
|
|
|
|
\ expand('%:t') ==# 'ControlP' ? 'CtrlP' :
|
|
|
|
|
\ &filetype ==# 'unite' ? 'Unite' :
|
|
|
|
|
\ &filetype ==# 'vimfiler' ? 'VimFiler' :
|
|
|
|
|
\ &filetype ==# 'vimshell' ? 'VimShell' :
|
|
|
|
|
\ winwidth(0) > 60 ? lightline#mode()[0:2] : ''
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
function! LightLineNeomakeErrors()
|
|
|
|
|
if !exists(":Neomake") || ((get(neomake#statusline#QflistCounts(), "E", 0) + get(neomake#statusline#LoclistCounts(), "E", 0)) == 0)
|
|
|
|
|
return ''
|
|
|
|
|
endif
|
|
|
|
|
return 'E:'.(get(neomake#statusline#LoclistCounts(), 'E', 0) + get(neomake#statusline#QflistCounts(), 'E', 0))
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
function! LightLineNeomakeWarnings()
|
|
|
|
|
if !exists(":Neomake") || ((get(neomake#statusline#QflistCounts(), "W", 0) + get(neomake#statusline#LoclistCounts(), "W", 0)) == 0)
|
|
|
|
|
return ''
|
|
|
|
|
endif
|
|
|
|
|
return 'W:'.(get(neomake#statusline#LoclistCounts(), 'W', 0) + get(neomake#statusline#QflistCounts(), 'W', 0))
|
|
|
|
|
endfunction
|
|
|
|
|
"1}}}
|
|
|
|
|
|
|
|
|
|
"{{{ Настройка CtrlP
|
|
|
|
|
let g:ctrlp_custom_ignore = {
|
|
|
|
|
\ 'dir': '\v[\/](\.(git|hg|svn)|\_site)$',
|
|
|
|
|
\ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
|
|
|
|
|
\ 'link': 'some_bad_symbolic_links',
|
|
|
|
|
\ }
|
|
|
|
|
let g:ctrlp_follow_symlinks = 1
|
|
|
|
|
|
|
|
|
|
if executable('ag')
|
|
|
|
|
" Use ag over grep
|
|
|
|
|
set grepprg=ag\ --nogroup\ --nocolor
|
|
|
|
|
|
|
|
|
|
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
|
|
|
|
|
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
|
|
|
|
|
|
|
|
|
|
" ag is fast enough that CtrlP doesn't need to cache
|
|
|
|
|
let g:ctrlp_use_caching = 0
|
|
|
|
|
endif
|
|
|
|
|
|
2021-12-22 11:38:34 +00:00
|
|
|
|
"""
|
|
|
|
|
""" Settings from mswin.vim
|
|
|
|
|
"""
|
|
|
|
|
if has("clipboard")
|
|
|
|
|
" CTRL-X and SHIFT-Del are Cut
|
|
|
|
|
vnoremap <C-X> "+x
|
|
|
|
|
vnoremap <S-Del> "+x
|
|
|
|
|
|
|
|
|
|
" CTRL-C and CTRL-Insert are Copy
|
|
|
|
|
vnoremap <C-C> "+y
|
|
|
|
|
vnoremap <C-Insert> "+y
|
|
|
|
|
|
|
|
|
|
" CTRL-V and SHIFT-Insert are Paste
|
|
|
|
|
map <C-V> "+gP
|
|
|
|
|
map <S-Insert> "+gP
|
|
|
|
|
|
|
|
|
|
cmap <C-V> <C-R>+
|
|
|
|
|
cmap <S-Insert> <C-R>+
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
" Pasting blockwise and linewise selections is not possible in Insert and
|
|
|
|
|
" Visual mode without the +virtualedit feature. They are pasted as if they
|
|
|
|
|
" were characterwise instead.
|
|
|
|
|
" Uses the paste.vim autoload script.
|
|
|
|
|
" Use CTRL-G u to have CTRL-Z only undo the paste.
|
|
|
|
|
|
|
|
|
|
if 1
|
|
|
|
|
exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
|
|
|
|
|
exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
imap <S-Insert> <C-V>
|
|
|
|
|
vmap <S-Insert> <C-V>
|
|
|
|
|
|
|
|
|
|
" Use CTRL-Q to do what CTRL-V used to do
|
|
|
|
|
noremap <C-Q> <C-V>
|
|
|
|
|
|
|
|
|
|
" Use CTRL-S for saving, also in Insert mode (<C-O> doesn't work well when
|
|
|
|
|
" using completions).
|
|
|
|
|
noremap <C-S> :update<CR>
|
|
|
|
|
vnoremap <C-S> <C-C>:update<CR>
|
|
|
|
|
inoremap <C-S> <Esc>:update<CR>gi
|
|
|
|
|
|
|
|
|
|
" For CTRL-V to work autoselect must be off.
|
|
|
|
|
" On Unix we have two selections, autoselect can be used.
|
|
|
|
|
if !has("unix")
|
|
|
|
|
set guioptions-=a
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
" CTRL-Z is Undo; not in cmdline though
|
|
|
|
|
noremap <C-Z> u
|
|
|
|
|
inoremap <C-Z> <C-O>u
|
|
|
|
|
|
|
|
|
|
" CTRL-Y is Redo (although not repeat); not in cmdline though
|
|
|
|
|
noremap <C-Y> <C-R>
|
|
|
|
|
inoremap <C-Y> <C-O><C-R>
|
|
|
|
|
"""
|
|
|
|
|
"""
|
|
|
|
|
"""
|
|
|
|
|
|
2019-05-29 08:13:03 +00:00
|
|
|
|
" Use a leader instead of the actual named binding
|
|
|
|
|
nmap <leader>p :CtrlP<cr>
|
|
|
|
|
|
|
|
|
|
" Easy bindings for its various modes
|
|
|
|
|
nmap <leader>bb :CtrlPBuffer<cr>
|
|
|
|
|
nmap <leader>bm :CtrlPMixed<cr>
|
|
|
|
|
nmap <leader>bs :CtrlPMRU<cr>"
|
|
|
|
|
"1}}}
|
|
|
|
|
|
|
|
|
|
"{{{1 Перемещение по буферам
|
|
|
|
|
nmap <Leader>bc :Bdelete<CR>
|
|
|
|
|
nmap <Leader>bn :bnext!<CR>
|
|
|
|
|
nmap <Leader>bp :bprev!<CR>
|
|
|
|
|
" map <Leader>b<c> to navigate through tabs
|
|
|
|
|
for c in range('1', '9')
|
|
|
|
|
exec "nmap <Leader>b".c." :b!".c."<CR>"
|
|
|
|
|
endfor
|
|
|
|
|
"1}}}
|
|
|
|
|
|
|
|
|
|
" Переход к последней позиции при открытии файла "
|
|
|
|
|
if has("autocmd")
|
|
|
|
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
" Открыть файл настроек "
|
|
|
|
|
nmap <silent> <leader>vie :e $MYVIMRC<CR>
|
|
|
|
|
|
|
|
|
|
" Перезагрузить файл настроек "
|
|
|
|
|
nmap <silent> <leader>vis :so $MYVIMRC<CR>
|
|
|
|
|
|
|
|
|
|
augroup reload_vimrc
|
|
|
|
|
autocmd!
|
|
|
|
|
autocmd BufWritePost $MYVIMRC nested source $MYVIMRC
|
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
|
|
"{{{ Neomake
|
|
|
|
|
" Запускать после записи или чтения файла
|
2019-05-29 08:22:03 +00:00
|
|
|
|
if exists(":Neomake")
|
|
|
|
|
call neomake#configure#automake('rw', 1000)
|
|
|
|
|
endif
|
2019-05-29 08:13:03 +00:00
|
|
|
|
|
|
|
|
|
function! LocationNext()
|
|
|
|
|
try
|
|
|
|
|
lnext
|
|
|
|
|
catch
|
|
|
|
|
try | lfirst | catch | endtry
|
|
|
|
|
endtry
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
" <leader>e для перехода к следующей ошибке или предупреждению "
|
|
|
|
|
nnoremap <leader>ee :call LocationNext()<cr>
|
|
|
|
|
|
|
|
|
|
let g:neomake_make_maker = {
|
|
|
|
|
\ 'exe': 'make',
|
|
|
|
|
\ 'args': ['-j', 'auto'],
|
|
|
|
|
\ 'errorformat': '%f:%l:%c: %m',
|
|
|
|
|
\ }
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
" Отмена автоматического комментирования кода при вставке из буфера "
|
|
|
|
|
autocmd FileType * setlocal formatoptions-=cro
|
|
|
|
|
|
|
|
|
|
" Запрет TAB для markdown "
|
|
|
|
|
autocmd FileType markdown set expandtab
|
|
|
|
|
|
|
|
|
|
autocmd FileType cmake setlocal ts=2 sts=2 sw=2 et
|
|
|
|
|
|
|
|
|
|
"{{{ Проверка орфографии для русского и английского
|
|
|
|
|
setlocal spell spelllang=ru,en
|
|
|
|
|
set spellsuggest=9
|
|
|
|
|
|
|
|
|
|
function! ChangeSpellLang()
|
|
|
|
|
if &spelllang == "ru,en"
|
|
|
|
|
setlocal spell spelllang=en
|
|
|
|
|
echo "spelllang: en"
|
|
|
|
|
elseif &spelllang == "en"
|
|
|
|
|
setlocal spell spelllang=ru
|
|
|
|
|
echo "spelllang: ru"
|
|
|
|
|
elseif &spelllang == "ru"
|
|
|
|
|
setlocal nospell spelllang=
|
|
|
|
|
echo "spelllang: off"
|
|
|
|
|
else
|
|
|
|
|
setlocal spell spelllang=ru,en
|
|
|
|
|
echo "spelllang: ru,en"
|
|
|
|
|
endif
|
|
|
|
|
endfunc
|
|
|
|
|
|
2020-05-16 09:11:23 +00:00
|
|
|
|
" Пропуск слов по шаблонам
|
|
|
|
|
fun! IgnoreSomeCasesSpell()
|
|
|
|
|
syn match LongUpperCase /\<[A-ZА-Я]\{3,}\>/ contains=@NoSpell transparent
|
|
|
|
|
syn match CamelCase /\<[A-Z][a-z]\+[A-Z].\{-}\>/ contains=@NoSpell transparent
|
|
|
|
|
syn cluster Spell add=CamelCase,LongUpperCase
|
|
|
|
|
endfun
|
|
|
|
|
autocmd BufRead,BufNewFile * :call IgnoreSomeCasesSpell()
|
|
|
|
|
|
|
|
|
|
" Выбор Набора языков для проверки орфографии "
|
2019-05-29 08:13:03 +00:00
|
|
|
|
map <C-F7> :call ChangeSpellLang()<CR>
|
|
|
|
|
imap <C-F7> <Esc>:call ChangeSpellLang()<CR>
|
|
|
|
|
|
|
|
|
|
" Выбор альтернатив для исправления "
|
|
|
|
|
imap <F7> <C-X>s
|
|
|
|
|
map <F7> z=
|
2020-05-16 09:11:23 +00:00
|
|
|
|
map <S-F7> ]s
|
2019-05-29 08:13:03 +00:00
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{ Переключение варианта нумерации строк
|
|
|
|
|
function! ChangeNumbering()
|
|
|
|
|
if &number
|
|
|
|
|
if &rnu
|
|
|
|
|
set nornu
|
|
|
|
|
else
|
|
|
|
|
set nonumber
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
set number
|
|
|
|
|
set rnu
|
|
|
|
|
endif
|
|
|
|
|
endfunc
|
|
|
|
|
|
|
|
|
|
map <LocalLeader># <Esc>:call ChangeNumbering()<CR>
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{ Меню для выбора кодировки файла
|
|
|
|
|
menu Encoding.Open\ as\ KOI8-R :e ++enc=koi8-r<CR>
|
|
|
|
|
menu Encoding.Open\ as\ CP1251 :e ++enc=cp1251<CR>
|
|
|
|
|
menu Encoding.Open\ as\ CP866 :e ++enc=cp866<CR>
|
|
|
|
|
menu Encoding.Open\ as\ LATIN1 :e ++enc=latin1<CR>
|
|
|
|
|
menu Encoding.Open\ as\ UCS-2LE :e ++enc=ucs-2le<CR>
|
|
|
|
|
menu Encoding.Open\ as\ UTF-8 :e ++enc=utf-8<CR>
|
|
|
|
|
menu Encoding.Convert\ to\ UTF-8 :set fenc=utf-8<CR>
|
|
|
|
|
|
|
|
|
|
map <F12> :emenu Encoding.<Tab>
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{ Easymotion
|
|
|
|
|
" Не включать команды по умолчанию "
|
|
|
|
|
let g:EasyMotion_do_mapping = 0
|
|
|
|
|
|
|
|
|
|
" Умный регистр "
|
|
|
|
|
let g:EasyMotion_smartcase = 1
|
|
|
|
|
|
|
|
|
|
" <Leader>ec{char} для перехода к {char} "
|
|
|
|
|
map <Leader>ec <Plug>(easymotion-bd-f)
|
|
|
|
|
nmap <Leader>ec <Plug>(easymotion-overwin-f)
|
|
|
|
|
|
|
|
|
|
" s{char}{char} для перехода к {char}{char} "
|
|
|
|
|
nmap s <Plug>(easymotion-overwin-f2)
|
|
|
|
|
|
|
|
|
|
" Переход к строке "
|
|
|
|
|
map <Leader>eg <Plug>(easymotion-bd-jk)
|
|
|
|
|
nmap <Leader>eg <Plug>(easymotion-overwin-line)
|
|
|
|
|
|
|
|
|
|
" Переход к слову "
|
|
|
|
|
map <Leader>ew <Plug>(easymotion-bd-w)
|
|
|
|
|
nmap <Leader>ew <Plug>(easymotion-overwin-w)
|
|
|
|
|
|
|
|
|
|
" Навигация по строкам "
|
|
|
|
|
map <Leader>el <Plug>(easymotion-lineforward)
|
|
|
|
|
map <Leader>ej <Plug>(easymotion-j)
|
|
|
|
|
map <Leader>ek <Plug>(easymotion-k)
|
|
|
|
|
map <Leader>eh <Plug>(easymotion-linebackward)
|
|
|
|
|
|
|
|
|
|
" Повторить последний переход
|
|
|
|
|
map <Leader>er <Plug>(easymotion-repeat)
|
|
|
|
|
|
|
|
|
|
" Замена стандартного поиска по тексту
|
|
|
|
|
" map / <Plug>(easymotion-sn)
|
|
|
|
|
" omap / <Plug>(easymotion-tn)
|
|
|
|
|
|
|
|
|
|
" These `n` & `N` mappings are options. You do not have to map `n` & `N` to EasyMotion.
|
|
|
|
|
" Without these mappings, `n` & `N` works fine. (These mappings just provide
|
|
|
|
|
" different highlight method and have some other features )
|
|
|
|
|
" map n <Plug>(easymotion-next)
|
|
|
|
|
" map N <Plug>(easymotion-prev)
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{ Incsearch
|
|
|
|
|
map / <Plug>(incsearch-forward)
|
|
|
|
|
map ? <Plug>(incsearch-backward)
|
|
|
|
|
map g/ <Plug>(incsearch-stay)
|
|
|
|
|
|
|
|
|
|
map z/ <Plug>(incsearch-easymotion-/)
|
|
|
|
|
map z? <Plug>(incsearch-easymotion-?)
|
|
|
|
|
map zg/ <Plug>(incsearch-easymotion-stay)
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{ UltiSnips
|
|
|
|
|
let g:UltiSnipsExpandTrigger="<tab>"
|
|
|
|
|
let g:UltiSnipsJumpForwardTrigger="<c-b>"
|
|
|
|
|
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
|
|
|
|
|
let g:UltiSnipsEditSplit="vertical"
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{ Table Mode
|
|
|
|
|
let g:table_mode_corner='|'
|
|
|
|
|
let g:table_mode_corner_corner='+'
|
|
|
|
|
let g:table_mode_header_fillchar='='
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{ Easy align
|
|
|
|
|
" Start interactive EasyAlign in visual mode (e.g. vipga)
|
|
|
|
|
xmap ga <Plug>(EasyAlign)
|
|
|
|
|
|
|
|
|
|
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
|
|
|
|
|
nmap ga <Plug>(EasyAlign)
|
|
|
|
|
"}}}
|
|
|
|
|
|
2019-06-02 10:03:49 +00:00
|
|
|
|
"{{{ AsciiDoctor
|
|
|
|
|
" What to use for HTML, default `asciidoctor`.
|
|
|
|
|
let g:asciidoctor_executable = 'asciidoctor'
|
|
|
|
|
|
|
|
|
|
" What extensions to use for HTML, default `[]`.
|
|
|
|
|
let g:asciidoctor_extensions = ['asciidoctor-diagram']
|
|
|
|
|
|
|
|
|
|
" What to use for PDF, default `asciidoctor-pdf`.
|
|
|
|
|
let g:asciidoctor_pdf_executable = 'asciidoctor-pdf'
|
|
|
|
|
|
|
|
|
|
" What extensions to use for PDF, default `[]`.
|
|
|
|
|
let g:asciidoctor_pdf_extensions = ['asciidoctor-diagram']
|
|
|
|
|
|
|
|
|
|
" What to use for DOCX, default `pandoc`.
|
|
|
|
|
" The DOCX 'compilation' process is to generate `docbook` using
|
|
|
|
|
" `g:asciidoctor-executable` and then to generate DOCX out of `docbook`
|
|
|
|
|
" using `pandoc`.
|
|
|
|
|
let g:asciidoctor_pandoc_executable = 'pandoc'
|
|
|
|
|
|
|
|
|
|
" List of filetypes to highlight, default `[]`
|
|
|
|
|
let g:asciidoctor_fenced_languages = ['python', 'c', 'javascript', 'sh', 'tex']
|
|
|
|
|
|
|
|
|
|
" Function to create buffer local mappings
|
|
|
|
|
fun! AsciidoctorMappings()
|
|
|
|
|
nnoremap <buffer> <leader>oo :AsciidoctorOpenRAW<CR>
|
|
|
|
|
nnoremap <buffer> <leader>op :AsciidoctorOpenPDF<CR>
|
|
|
|
|
nnoremap <buffer> <leader>oh :AsciidoctorOpenHTML<CR>
|
|
|
|
|
nnoremap <buffer> <leader>ox :AsciidoctorOpenDOCX<CR>
|
|
|
|
|
nnoremap <buffer> <leader>ch :Asciidoctor2HTML<CR>
|
|
|
|
|
nnoremap <buffer> <leader>cp :Asciidoctor2PDF<CR>
|
|
|
|
|
nnoremap <buffer> <leader>cx :Asciidoctor2DOCX<CR>
|
|
|
|
|
endfun
|
|
|
|
|
|
|
|
|
|
" Call AsciidoctorMappings for all `*.adoc` and `*.asciidoc` files
|
|
|
|
|
augroup asciidoctor
|
|
|
|
|
au!
|
|
|
|
|
au BufEnter *.adoc,*.asciidoc call AsciidoctorMappings()
|
|
|
|
|
augroup END
|
|
|
|
|
"}}}
|
2020-03-30 06:41:46 +00:00
|
|
|
|
|
2020-05-16 08:33:59 +00:00
|
|
|
|
|
|
|
|
|
"{{{ LaTeX
|
|
|
|
|
augroup latex
|
|
|
|
|
au!
|
|
|
|
|
au BufNewFile,BufRead *.tex
|
2020-05-16 09:11:23 +00:00
|
|
|
|
\ setlocal tabstop=2 |
|
|
|
|
|
\ setlocal softtabstop=2 |
|
|
|
|
|
\ setlocal shiftwidth=2 |
|
|
|
|
|
\ setlocal expandtab |
|
|
|
|
|
\ setlocal iskeyword+=: |
|
|
|
|
|
\ setlocal updatetime=1
|
|
|
|
|
|
2020-05-16 08:33:59 +00:00
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
|
|
let g:tex_flavor='latex'
|
2020-05-16 09:11:23 +00:00
|
|
|
|
let g:vimtex_quickfix_open_on_warning = 0
|
|
|
|
|
let g:vimtex_quickfix_mode = 2
|
2020-05-16 09:46:18 +00:00
|
|
|
|
let g:vimtex_view_general_viewer = 'evince'
|
|
|
|
|
"let g:vimtex_view_method = 'qpdfview'
|
|
|
|
|
"let g:livepreview_previewer = 'qpdfview'
|
2020-05-16 09:11:23 +00:00
|
|
|
|
let g:tex_conceal = ''
|
2020-05-16 09:46:18 +00:00
|
|
|
|
|
|
|
|
|
let g:vimtex_compiler_latexmk = {
|
|
|
|
|
\ 'executable' : 'latexmk',
|
|
|
|
|
\ 'options' : [
|
|
|
|
|
\ '-xelatex',
|
|
|
|
|
\ '-file-line-error',
|
|
|
|
|
\ '-synctex=1',
|
|
|
|
|
\ '-interaction=nonstopmode',
|
|
|
|
|
\ ],
|
|
|
|
|
\}
|
2020-05-16 08:33:59 +00:00
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
"{{{ Python
|
2020-05-16 09:11:23 +00:00
|
|
|
|
augroup python
|
|
|
|
|
au!
|
|
|
|
|
au BufNewFile,BufRead *.py
|
|
|
|
|
\ setlocal tabstop=4 |
|
|
|
|
|
\ setlocal softtabstop=4 |
|
|
|
|
|
\ setlocal shiftwidth=4 |
|
|
|
|
|
\ setlocal textwidth=79 |
|
|
|
|
|
\ setlocal expandtab |
|
|
|
|
|
\ setlocal autoindent |
|
|
|
|
|
\ setlocal fileformat=unix
|
2020-05-16 08:33:59 +00:00
|
|
|
|
|
|
|
|
|
let g:pymode_python = 'python3'
|
|
|
|
|
|
|
|
|
|
" enable all Python syntax highlighting features
|
|
|
|
|
let python_highlight_all = 1
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
" Чтение настроек проектов из каталогов .vimprj
|
2019-06-13 11:17:39 +00:00
|
|
|
|
call vimprj#init()
|
|
|
|
|
|
2020-03-30 06:41:46 +00:00
|
|
|
|
"{{{ Чтение настроек для текущего компьютера из каталога $HOME/.vim/hosts
|
|
|
|
|
let s:host_vimrc = $HOME . '/.vim/hosts/' . hostname() . '.vimrc'
|
|
|
|
|
if filereadable(s:host_vimrc)
|
|
|
|
|
execute 'source ' . s:host_vimrc
|
|
|
|
|
endif
|
|
|
|
|
"}}}
|