📜 ⬆️ ⬇️

The experience of switching from Sublime to Vim



This article does not reveal all the intricacies of moving through the text or editing it. Basic movements can be found in the vimtutor, the other combinations are studied in the process. Some of them, especially important in the programming process, I will cover later.

For quite a long time, I used sublime (about 4 years) as the main development environment, but recently something has changed: I have mastered the blind 9-finger printing method. At that moment I began to understand people who are uncomfortable reaching for a mouse or arrows. Removing fingers from "home" positions has become unnatural and unproductive. Then I turned on the vintage. The problem, it seems, has become irrelevant, but something was missing. I don’t remember what made me change for vim, but I always liked how braces (MatchParen) stand out and what the cursor looks like :). I tried Vim even before this, when the configs on the server were correct, however, all the “magic” was limited to switching to the insert mode and successfully saving / exiting the editor.

The first thing you need to understand is that vim out of the box is suitable except for editing configs, you need to install several plug-ins for comfortable work with the code. 33 was enough for me. I did not set myself the goal of completely copying the behavior of the sublime, rather making the work in vim just as simple and intuitive. This manual describes all installed plug-ins, as well as settings that, in my opinion, make working with plug-ins and vim itself more convenient. You can find the necessary plugins on the official website , although I prefer vimawesome . The environment is Ubuntu 16.04 and console vim 7.4.
')
All plugins are on github, where you can see a quick guide to installing or using one or another plug-in, for a detailed description you should go to help. If it is not clear from the description of the plugin how to use it, then, for sure, the necessary combination will be in the hotkey section. All settings are registered in ~ / .vimrc or ~ / .vim / vimrc, if the file does not exist, create it. Perhaps we will begin.

vundle
There is nothing pleasant in putting plugins manually. Vundle acts as a package manager, among which there are also pathogen , vim-plug and others. I can not say that it is more convenient, since I used only Vundle. Choose at your discretion.

Installed plugins
// set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() // let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' // common Plugin 'scrooloose/nerdtree' Plugin 'valloric/youcompleteme' Plugin 'xolox/vim-easytags' Plugin 'majutsushi/tagbar' Plugin 'tpope/vim-fugitive' Plugin 'easymotion/vim-easymotion' Plugin 'ctrlpvim/ctrlp.vim' Plugin 'terryma/vim-multiple-cursors' Plugin 'vim-airline/vim-airline' Plugin 'vim-airline/vim-airline-themes' Plugin 'scrooloose/nerdcommenter' Plugin 'matze/vim-move' Plugin 'raimondi/delimitmate' Plugin 'mattn/emmet-vim' Plugin 'scrooloose/syntastic' Plugin 'tpope/vim-surround' Plugin 'sirver/ultisnips' Plugin 'honza/vim-snippets' Plugin 'xolox/vim-session' Plugin 'xolox/vim-misc' Plugin 'SyntaxAttr.vim' Plugin 'dyng/ctrlsf.vim' Plugin 'rking/ag.vim' Plugin 'godlygeek/tabular' // php Plugin 'stanangeloff/php.vim' Plugin 'sumpygump/php-documentor-vim' Plugin 'arnaud-lb/vim-php-namespace' // javascript Plugin 'pangloss/vim-javascript' // html Plugin 'othree/html5.vim' // twig Plugin 'evidens/vim-twig' // css Plugin 'mtscout6/vim-tagbar-css' // colors Plugin 'damage220/solas.vim' Plugin 'nanotech/jellybeans.vim' Plugin 'mhartington/oceanic-next' call vundle#end() 
Teams
 //     :PluginList //   :PluginInstall //    :PluginClean //    :PluginSearch foo 
Installation
 git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim 
Dependencies
 git  curl 
solas
Of all the color themes I tried, I liked jellybeans the most, but after a while I decided to create my own theme . Fortunately, finding out the names of all the groups was not difficult, unfortunately, the terminals are very limited in the color palette and support, as a rule, 256 colors. Solas is based on the standard theme in PhpStorm.
move
The plugin is designed to move the current line or selected lines up or down.

Custom settings
 //     <Cj>  <Ck> let g:move_key_modifier = 'C' 
nerdtree
The most popular plugin designed to work with the file system. Adds convenient hotkeys to create, move and delete files and directories.

Custom settings
 //       let NERDTreeAutoDeleteBuffer = 1 
php-documentor
The plugin creates doc-blocks for classes, class properties, functions.
php
The plugin provides improved syntax support. Updated list of constants, classes and functions to version 5.6.
html5
The plugin provides improved support for syntax and indentation.
javascript
The plugin provides improved support for syntax and indentation.
twig
The plugin adds support for twig templates.
fugitive
Convenient wrapper over git, provides many commands.
ultisnips
The plugin adds support for snippets in vim.

Useful combinations
 <Tab> -   
snippets
A set of snippets for most programming languages.

Dependencies
 snipmate  ultisnips 
SyntaxAttr
The plugin shows the syntax group, links (hi link) and group color. Convenient plugin to create your own color schemes.
ctrlp
For 3 years I was so used to the fuzzy search that I can hardly imagine the development without this possibility. As I recall, this was the first plugin I installed. Ctrlp searches for tags, files, buffers and the latest active files.

Teams
 //      ( Ctrl + R  sublime) :CtrlPBufTag 
Useful combinations
 <Cj>  <Ck> -        <Enter> -     <Ct> -     <Cv> -   / (  ) <Cx> -   / (  ) <Cd> -          
Custom settings
 //  , CtrlP      ,    ,    "repo",    : // project/src/Repository/Repository.php // project/src/Repository/Foo.php // CtrlP      Foo.php.  , CtrlP,       vim'a,   .      let g:ctrlp_by_filename = 1 //   . w -  ,     CVS (.git, .svn). r -   (pwd). let g:ctrlp_working_path_mode = 'wr' //  ,    ,     <Cp>,  ..      (  ),     . let g:ctrlp_map = '' //      let g:ctrlp_buftag_types = { \'php': '--php-kinds=icdf' \} 
Dependencies
      ctags 
tagbar
I like the minimap in the sublime, looking at it you can immediately understand the structure of the file. Naturally, I wanted the same in vim, and, wow , the plugin is called vim-minimap . Unfortunately, I didn’t like the plugin at all . An alternative was needed, and she was found - tagbar . The plugin displays a list of tags in the current file, grouping and sorting them in the desired order.

Custom settings
 //    ,      ,     let g:tagbar_sort = 0 //    /   let g:tagbar_iconchars = ['+', '-'] //   let g:tagbar_map_close = '<Cm>' //     let g:tagbar_type_php = { \'ctagstype': 'php', \'kinds': [ \'i:interfaces', \'c:classes', \'d:constants', \'f:functions' \] \} 
Dependencies
 ctags 
tagbar-css
The plugin adds css, less and scss support for the tagbar. In addition to installing the plugin itself, write the following lines in your ~ / .ctags
 --langdef=css --langmap=css:.css.less.scss --regex-css=/^[ \t]*@([A-Za-z0-9_-]+)/@\1/v,var,variables/ --regex-css=/^[ \t]*\.([A-Za-z0-9_-]+)/.\1/c,class,classes/ --regex-css=/^[ \t]*#([A-Za-z0-9_-]+)/#\1/i,id,ids/ --regex-css=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/ --regex-css=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/m,media,medias/ 
Dependencies
 tagbar 
easymotion
One of the best plugins in my opinion. Allows you to instantly navigate through the code by entering a few characters.

Custom settings
 //     let g:EasyMotion_smartcase = 1 //   (        ) let g:EasyMotion_do_shade = 0 //     hi link EasyMotionTarget Search 
Note
  easymotion    ,   ,     ,      . Vim ,     ,      ,     . 
session
The plugin makes working with sessions more convenient by providing a wrapper on the standard command: mksession.

Teams
 //  .        <Cz>,   "!"   , , "OpenSession! name" :OpenSession name //   :SaveSession name 
Custom settings
 //    .  ,    vim   let g:session_autoload = 'yes' //   let g:session_autosave = 'yes' //    5  let g:session_autosave_periodic = 5 //      let g:session_autosave_silent = 1 //       let g:session_default_to_last = 1 
Dependencies
 misc 
misc
Plugin required for session work.
emmet
About emmet'e said too much to write about him here.

Custom settings
 //      <Ce> let g:user_emmet_expandabbr_key = '<Ce>' 
delimitmate
The plugin indents between any brackets or quotes.

Custom settings
 //      enter let delimitMate_expand_cr = 1 //      . " |"   " | " let delimitMate_expand_space = 1 //  html,   >:<,     au FileType vim,html let b:delimitMate_matchpairs = "(:),[:],{:},<:>,>:<" 
syntastic
Plugin for syntax checking. The readme is advised to set the following settings, do not argue.

Custom settings
 let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0 
NERDCommenter
From the plugin for commenting code, I wanted to achieve the following behavior: for commenting a section of code we use <C -?>, For commenting a line, uncommenting a line / code fragment is <C - />. As far as I remember, of all the plug-ins that I installed (about 4), none of them managed exactly this task. To uncomment a code snippet you have to use the standard combination - \ <Leader \> cu, where \ <Leader \> - ",". This is not a standard key, the default is "\". Otherwise the same behavior as in the sublime.

Custom settings
 //    ()  let g:NERDSpaceDelims = 1 
airline
The plugin displays a convenient status bar that is easy to customize to fit your needs. You can also allow the plugin to control the appearance of the tabs. To work correctly, you need patched fonts that you can get from here .

Custom settings
 // solarized     ,     let g:airline_theme='solarized' //    let g:airline_powerline_fonts = 1 //    let g:airline#extensions#tabline#enabled = 1 //   tabline let g:airline#extensions#tabline#tab_min_count = 0 //   ,    sublime:      -   ,       ,     let g:airline#extensions#tabline#formatter = 'unique_tail' //   let g:airline#extensions#tabline#show_buffers = 0 //   +  :help filename-modifiers let g:airline#extensions#tabline#fnamemod = ':t' //         . ,   ,  ,     trailing-spaces   :     (  phpDoc).       . ,  . let g:airline_section_warning = '' let g:airline_section_error = '' //  "X"     (!?) let g:airline#extensions#tabline#show_close_button = 0 //     let g:airline#extensions#tabline#left_alt_sep = '' //  tagbar let g:airline#extensions#tagbar#enabled = 0 //    let g:airline#extensions#tabline#show_tab_nr = 1 //     let g:airline#extensions#tabline#tab_nr_type = 1 
airline-themes
A set of topics for the airline.

Dependencies
 airline 
youcompleteme
YCM provides fast code completion with fuzzy search. The most "heavy" plugin of all and the most unpleasant to install. It weighs 275.9 mb and noticeably slows down the launch of the editor. For comparison, all other plug-ins together occupy 15.1 mb. The plugin requires vim compiled with python support. To verify, run the command vim --version | grep "+ python" in your terminal. I do not like to compile from source and, fortunately, in my repository there is a package "vim-nox" with support for scripting languages.

Custom settings
 // ycm     , , -,  3     -  . let g:ycm_server_python_interpreter='python' //    , ,      ")" let g:ycm_autoclose_preview_window_after_completion = 1 //  ultisnips  tab    let g:ycm_key_list_select_completion = ['<Down>'] 
Installation
    ,   "install.py"   ,   help. 
multiple-cursors
The name speaks for itself - the plugin allows you to work with multiple cursors simultaneously.

Teams
 //    :MultipleCursorsFind pattern 
Useful combinations
 <Cn> -      <Cp> -      <Cx> -        //  ,     ,    : c -       I -    A -    
ctrlsf
For a long time, I was frightened by the thought of how I would implement the replacement of the line for the entire project, and even with the preview and ... confirmation. And in vain - for vim, there was (and almost immediately) a wonderful plugin that provides the necessary functionality. Just type the command: CtrlSF pattern [filemask] and a window will open with all the entries. Editing as a regular file, save (: w). After that, the plugin will ask for confirmation and indicate how many files will be changed. Be careful, if you click on \ <Esc \>, the data will still commit. However, you can always undo the changes (u) and save the buffer again. It is well combined with multiple cursors, especially with the command: MultipleCursorsFind. CtrlSF is an abstraction over ack / ag, so one of these plugins will have to be installed. About the installation of ag read below.

Teams
 :CtrlSF foo *.php 
Useful combinations
 <Cj>  <-k> -       
Custom settings
 //    let g:ctrlsf_position = 'right' 
Dependencies
 ack  ag 
ag
Wrap over system ag. According to the author, due to parallelization, ag works 34 times faster ack, more . For the plugin to work, you need to install ag itself. The ubuntu package is called silversearcher-ag.
php-namespace
Plugin for more convenient work with the use operator. Connects the required class using the tag file.

Dependencies
 ctags,  -. 
surround
The plugin allows you to add, replace or delete the surrounding text quotes, brackets or xml-tags. ys, cs, ds - used to insert, replace and delete framing characters, respectively.

Useful combinations
 ds' -    dst -    cs'" -      ysiw" -      ysiw<a> -     <a> 
tabular
The plugin aligns text with a specific pattern, for example, "=" or "|". I am not a fan of “beauty” code, but recently, when I was making a cheat sheet at times in English, the plugin was very useful.

Teams
 //     "|" :Tabularize /| 
ctags
To use such plugins as CtrlP, TagBar and php-namespace, you will need ctags - a powerful utility for analyzing the source code of programs. Ctags creates a tag file that contains the names of classes, functions, variables, ..., and their positions. Ctags 5.9 supports 43 languages ​​out of the box, but can be extended with regular expressions (see tagbar-css).

Useful keys
 //    --list-languages //      --list-kinds=lang 
Installation
        . ,  ubuntu -  exuberant-ctags 
Note
       - "tags.vendor"       "tags" 
easytags
The tag file provides a lot of information, but creating it manually is not a pleasant thing. Easytags will save you from the routine, it’s enough to write once: UpdateTags -R in a new project, and the plugin will index all subsequent changes by itself.

Custom settings
 //      ,  ~/.vimtags let g:easytags_file = './tags' //    let g:easytags_auto_highlight = 0 //  (:help autocmd-events),   easytags let g:easytags_events = ['BufWritePost'] //   vim    - let g:easytags_async = 1 
Dependencies
 ctags 

It is quite difficult to describe each plugin in detail, and there is no need, probably. It makes no sense to list all the commands, I just described those that I used, but the article was already quite voluminous. Now let's consider the features of the editor itself.

Settings
For details, go to : help setting
 //    ,  ,  tabstop  shiftwidth   set tabstop=4 set shiftwidth=4 set softtabstop=4 //       set autoread //   set autoindent set smartindent //    .  ,         10j,  set rnu //     set laststatus=2 // ,  vim       . // ,   vim'e   "df",     "d"     , //   "f",      "d". set timeoutlen=500 //     .   ,        , //   ,         .   ,    ,    <Esc> //         ,   ,   . set ttimeoutlen=0 //     .   <C-6>   , vim    "Insert"  "Insert (lang)", //      .     ,     . set keymap=russian-jcukenwin set iminsert=0 set imsearch=0 //   set encoding=utf-8 set termencoding=utf-8 //  swap-.    ,      set noswapfile //     ,       , vim  swap-, //     CursorHold.  ,  tagbar,      . //   swap-   ,     (  - 4000). set updatetime=500 // :vsplit    set splitright // :split    set splitbelow //    vi set nocompatible //  -    set tags=./tags; //    .       ,  ctrlsf,  CtrlSF. //     ,   \C      set ignorecase // ,    , vim  ,     , hidden    set hidden //      set hlsearch //        set incsearch //  ,     set cursorline //  c    set pumheight=10 //      .         set fillchars+=vert:\ //  mapleader  ",",   - "\" let mapleader="," //    Vundle filetype off filetype plugin on filetype plugin indent on //    syntax enable //    set background=dark //    colorscheme solas 
Shortcuts
The syntax for creating a combination, as it is not difficult to guess, is as follows:
 [[mode]nore]map keys command 
where mode is the mode or environment where the combination works
nore (non-recursive) - do not “open” the combination, but use the default
 :map j gg // j = gg :map Q j // Q = gg :noremap W j // W = j <CR> - enter <C> - Ctrl 
More about the appointment of combinations
 //   ""   df. "d"   ,  "j" // ,  "jj"    ,    ,      imap df <Esc>l //       , ,  return nnoremap 2o o<CR> //  ,    ,     nnoremap 2O O<Esc>O //     nnoremap tm :tabm +1<CR> //     nnoremap tM :tabm -1<CR> //     nnoremap <Ch> :noh<CR> //    map <C-?> <plug>NERDCommenterComment //  ,     map <C-_> <plug>NERDCommenterToggle //  phpDoc  , ,  nnoremap <Cd> :call PhpDoc()<CR> //     nnoremap <Cm> :TagbarToggle<CR> //    nnoremap <Cp> :NERDTreeToggle<CR> //  syntax group   ,     .       nnoremap <Cg> :call SyntaxAttr()<CR> //     <Cj>  <Ck>      ,  <Cn>  <Cp> inoremap <Cj> <Cn> inoremap <Ck> <Cp> cnoremap <Cj> <Cn> cnoremap <Ck> <Cp> //  use autocmd FileType php noremap <Cu> :call PhpInsertUse()<CR> //  ~/.vimrc nnoremap <F4> :tabe ~/.vimrc<CR>:tabm 0<CR> //  ~/.vimrc    nnoremap <F5> :w<CR>:so $MYVIMRC<CR> 
I do not like the idea of ​​changing the standard behavior of the keys, but I found the following combinations very convenient for myself. I rarely use the search for a character in the string (f and F), and I have never used commands such as J and K.
 //      nnoremap KH //      nnoremap JL //    nnoremap H gT //    nnoremap L gt //    nnoremap F :CtrlP<CR> nnoremap ff :CtrlP<CR> // find tag -      nnoremap ft :CtrlPBufTag<CR> // find buffer -    nnoremap fb :CtrlPBuffer<CR> // find symbol -       nmap fs <Plug>(easymotion-s) // find line -       nmap fl <Plug>(easymotion-sl) // find current -       nnoremap fc :NERDTreeFind<CR> // find pattern -     nnoremap fp :CtrlSF 
The most difficult task for me was to install youcompleteme setting the tab switching <Alt-n>, which I spent 5 hours on (5, Karl!). As I just did not write: <Alt-1>, <A-1>, <M-1>, ^ [1 - escape sequence (<Cv>, then Alt + 1). I read: help: map-alt-keys, created a ~ / .inputrc file with the contents of set convert-meta on. It's funny, but everything worked in xterm. Gnome-terminal gave me a lot of unforgettable sensations, until I came across this answer to SO. , , , , , . , :
 for c in range(1, 9) exec "set <A-".c.">=\e".c exec "map \e".c." <A-".c.">" let n = c - '0' exec "map <M-". n ."> ". n ."gt" endfor 
- , , - ( , , ), .
 //    .  vim,    "clipboard".  ,  vim --version | grep "+clipboard"    <Cr> * //      zz //     ( -) <C-]> //         <C-]> <Ct> //   (d)  (y) .           <Cr> " 
Vim , .vimrc «abbr help tab help» «help», , vim «tab help». «», <Cv>.

: vim , . , emacs , . sublime'a vim' 4- ( ) 9- . , sublime , , ; , . , sublime, vim . viml. , Windows Ubuntu. Windows , , 10 . , - , . linux, - . ( ) (bash) . vim'e - . , sublime key:value. . , , — , — . viml , , . , , , , python api sublime . , vim , .vimrc, , , .

1. , airline , , , . - , , , . , , ?
2. readme nerdtree , / g:NERDTreeDirArrowExpandable g:NERDTreeDirArrowCollapsible. , "+" "-", nerdtree . - ?
3. youcompleteme omnicompletion? , <Cx><Co>.
4. php- "<?php", "<", vim ">". php-? - :
 au FileType php set matchparen-=< 
.vimrc
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" common
Plugin 'scrooloose/nerdtree'
Plugin 'valloric/youcompleteme'
Plugin 'xolox/vim-easytags'
Plugin 'majutsushi/tagbar'
Plugin 'tpope/vim-fugitive'
Plugin 'easymotion/vim-easymotion'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'scrooloose/nerdcommenter'
Plugin 'matze/vim-move'
Plugin 'raimondi/delimitmate'
Plugin 'mattn/emmet-vim'
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-surround'
Plugin 'sirver/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'xolox/vim-session'
Plugin 'xolox/vim-misc'
Plugin 'SyntaxAttr.vim'
Plugin 'dyng/ctrlsf.vim'
Plugin 'rking/ag.vim'
Plugin 'godlygeek/tabular'

" php
Plugin 'stanangeloff/php.vim'
Plugin 'sumpygump/php-documentor-vim'
Plugin 'arnaud-lb/vim-php-namespace'

" javascript
Plugin 'pangloss/vim-javascript'

" html
Plugin 'othree/html5.vim'

" twig
Plugin 'evidens/vim-twig'

" css
Plugin 'mtscout6/vim-tagbar-css'

" colors
Plugin 'damage220/solas.vim'
Plugin 'nanotech/jellybeans.vim'
Plugin 'mhartington/oceanic-next'

call vundle#end()

" settings
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoread
set autoindent
set smartindent
set rnu
set laststatus=2
set timeoutlen=500
set ttimeoutlen=0
set keymap=russian-jcukenwin
set iminsert=0
set imsearch=0
set encoding=utf-8
set termencoding=utf-8
set updatetime=500
set noswapfile
set splitright
set splitbelow
set nocompatible
set tags=./tags;
set ignorecase
set hidden
set hlsearch
set incsearch
set cursorline
set pumheight=10
set fillchars+=vert:\ 
let mapleader=","
filetype off
filetype plugin on
filetype plugin indent on
" autocmd CompleteDone * pclose

" color
syntax enable
set background=dark
colorscheme solas

" abbreviations
abbr help tab help

" mappings
imap df <Esc>l
nnoremap 2o o<CR>
nnoremap 2O O<Esc>O
nnoremap tm :tabm +1<CR>
nnoremap tM :tabm -1<CR>
nnoremap KH
nnoremap JL
nnoremap H gT
nnoremap L gt
nnoremap F :CtrlP<CR>
nnoremap ff :CtrlP<CR>
nnoremap ft :CtrlPBufTag<CR>
nnoremap fb :CtrlPBuffer<CR>
nmap fs <Plug>(easymotion-s)
nmap fl <Plug>(easymotion-sl)
nnoremap fc :NERDTreeFind<CR>
nnoremap fp :CtrlSF 
nnoremap <Ch> :noh<CR>
map <C-?> <plug>NERDCommenterComment
map <C-_> <plug>NERDCommenterToggle
nnoremap <Cd> :call PhpDoc()<CR>
nnoremap <Cm> :TagbarToggle<CR>
nnoremap <Cp> :NERDTreeToggle<CR>
nnoremap <Cg> :call SyntaxAttr()<CR>
inoremap <Cj> <Cn>
inoremap <Ck> <Cp>
cnoremap <Cj> <Cn>
cnoremap <Ck> <Cp>
autocmd FileType php noremap <Cu> :call PhpInsertUse()<CR>
nnoremap <F4> :tabe ~/.vimrc<CR>:tabm 0<CR>
nnoremap <F5> :w<CR>:so $MYVIMRC<CR>

" map <alt+n> to navigate through tabs
for c in range(1, 9)
	exec "set <A-".c.">=\e".c
	exec "map \e".c." <A-".c.">"

	let n = c - '0'
	exec "map <M-". n ."> ". n ."gt"
endfor

" nerdtree
let NERDTreeAutoDeleteBuffer = 1

" move
let g:move_key_modifier = 'C'

" youcompleteme
let g:ycm_server_python_interpreter='python'
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_key_list_select_completion = ['<Down>']

" emmet
let g:user_emmet_expandabbr_key = '<Ce>'

" airline
let g:airline_theme='solarized'
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#tab_min_count = 0
let g:airline#extensions#tabline#formatter = 'unique_tail'
let g:airline#extensions#tabline#show_buffers = 0
let g:airline#extensions#tabline#fnamemod = ':t'
let g:airline_section_warning = ''
let g:airline_section_error = ''
let g:airline#extensions#tabline#show_close_button = 0
let g:airline#extensions#tabline#left_alt_sep = ''
let g:airline#extensions#tagbar#enabled = 0
let g:airline#extensions#tabline#show_tab_nr = 1
let g:airline#extensions#tabline#tab_nr_type = 1

" easymotion
let g:EasyMotion_smartcase = 1
let g:EasyMotion_do_shade = 0
hi link EasyMotionTarget Search
hi EasyMotionTarget2First ctermfg=202 ctermbg=None cterm=None
hi EasyMotionTarget2Second ctermfg=202 ctermbg=None cterm=None

" session
let g:session_autoload = 'yes'
let g:session_autosave = 'yes'
let g:session_autosave_periodic = 5
let g:session_autosave_silent = 1
let g:session_default_to_last = 1

" NERDCommenter
let g:NERDSpaceDelims = 1

" html
au BufNewFile,BufRead *.tpl set filetype=html syntax=php

" syntastic
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

" tagbar
let g:tagbar_sort = 0
let g:tagbar_width = 35
let g:tagbar_iconchars = ['+', '-']
let g:tagbar_map_close = '<Cm>'
let g:tagbar_type_php = {
	\'ctagstype': 'php',
	\'kinds': [
		\'i:interfaces',
		\'c:classes',
		\'d:constants',
		\'f:functions'
	\]
\}
let g:tagbar_type_javascript = {
\'ctagstype':'JavaScript',
	\'kinds' : [
		\'f:functions',
		\'c:classes',
		\'m:methods',
		\'p:properties'
	\]
\}

" delimitmate
let delimitMate_expand_cr = 1
let delimitMate_expand_space = 1
au FileType vim,html let b:delimitMate_matchpairs = "(:),[:],{:},<:>,>:<"

" NERDTree
" let g:NERDTreeDirArrowExpandable = '+'
" let g:NERDTreeDirArrowCollapsible = '-'

" ctrlp
let g:ctrlp_by_filename = 1
let g:ctrlp_working_path_mode = 'wr'
let g:ctrlp_map = ''
let g:ctrlp_buftag_types = {
	\'php': '--php-kinds=icdf'
\}

" ctrlsf
let g:ctrlsf_position = 'right'

" easytags
let g:easytags_file = './tags'
let g:easytags_auto_highlight = 0
let g:easytags_events = ['BufWritePost']
let g:easytags_async = 1 
vim ide
: « vim'e , ide?», , .

vim', chrome:

vimium
, .
wasavi
vim'a . , \<Insert\>, <C-enter> ().

PS : viml ( ), "//", viml , , .
PS2 : "\", html-. «pre» — , , .

UPD : gui solas.

Source: https://habr.com/ru/post/303524/


All Articles