Advertisement
Fonndes

Untitled

Jan 4th, 2024
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 2.68 KB | None | 0 0
  1. syntax on                   " syntax highlighting
  2. set ignorecase              " case insensitive
  3. set mouse=a                  " middle-click paste with
  4. set tabstop=2               " number of columns occupied by a tab
  5. set softtabstop=2          
  6. set shiftwidth=2            " width for autoindents
  7. set expandtab               " converts tabs to white space
  8. set number                  " add line numbers
  9. set noswapfile              " disable creating swap file
  10. set cursorline
  11. highlight Cursorline cterm=bold
  12. set encoding=utf-8
  13. set nocompatible
  14. set smartcase
  15. set hlsearch
  16. set smarttab
  17. set autoindent
  18. set smartindent
  19. set relativenumber
  20. set wildmode=longest,list
  21. set clipboard=unnamedplus
  22. set ttyfast
  23. set so=30
  24. filetype plugin indent on
  25. set background=dark
  26. call plug#begin('~/.vim/plugged')
  27. Plug 'neoclide/coc.nvim', {'branch': 'release'}
  28. Plug 'preservim/nerdtree'
  29. Plug 'preservim/nerdcommenter'
  30. Plug 'vim-airline/vim-airline'
  31. Plug 'morhetz/gruvbox'
  32. Plug 'vim-airline/vim-airline-themes'
  33. Plug 'ryanoasis/vim-devicons'
  34. call plug#end()
  35. " авто открытие NERDtree
  36. autocmd StdinReadPre * let s:std_in=1
  37. autocmd VimEnter * NERDTree | wincmd p
  38.  
  39. nnoremap <space>e :NERDTreeFocus<CR>
  40.  
  41. " Показывает количество строк в файлах
  42. let g:NERDTreeFileLines = 1
  43. " Игнорировать указанные папки
  44. let g:NERDTreeIgnore = ['^node_modules$', '^__pycache__$']
  45. " Закрыть vim, если единственная вкладка - это NERDTree
  46. autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
  47.  
  48.  
  49. autocmd CursorHold * silent call CocActionAsync('highlight')
  50.  
  51. inoremap <expr> <Tab> coc#pum#visible() ? coc#pum#confirm() : "\<Tab>"
  52.  
  53. let g:NERDCustomDelimiters = { 'c': { 'left': '/*','right': '*/' } }
  54.  
  55. " Add `:Format` command to format current buffer
  56. command! -nargs=0 Format :call CocActionAsync('format')
  57.  
  58. " Add `:Fold` command to fold current buffer
  59. command! -nargs=? Fold :call     CocAction('fold', <f-args>)
  60.  
  61. " Add `:OR` command for organize imports of the current buffer
  62. command! -nargs=0 OR   :call     CocActionAsync('runCommand', 'editor.action.organizeImport')
  63.  
  64. " Add (Neo)Vim's native statusline support
  65. " NOTE: Please see `:h coc-status` for integrations with external plugins that
  66. " provide custom statusline: lightline.vim, vim-airline
  67. set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
  68.  
  69. color gruvbox
  70.  
  71. let g:airline_theme='dark'
  72. let g:airline#extensions#tabline#enabled = 1
  73. let g:airline#extensions#tabline#formatter = 'default'
  74. let g:airline_powerline_fonts = 1
  75.  
  76. let g:WebDevIconsUnicodeDecorateFolderNodes = 1
  77.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement