Guest User

Untitled

a guest
Jul 2nd, 2018
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 20.19 KB | None | 0 0
  1. "------------------------------------------------------------
  2. " CATEGORIES {{{
  3. "------------------------------------------------------------
  4.  
  5. " PLUGIN MANAGER
  6. " MISC
  7. " COLORS
  8. " SPACES AND TABS
  9. " UI CONFIG
  10. " STATUSLINE
  11. " SEARCHING
  12. " MOVEMENTS
  13. " LEADER SHORTCUTS
  14. " PLUGIN SETTINGS
  15. " AUTO COMMANDS  
  16. " CUSTOM FUNCTIONS
  17. " SOURCE VIM CONFIGS
  18. " }}}
  19. "------------------------------------------------------------
  20. " PLUGIN MANAGER {{{
  21. "------------------------------------------------------------
  22.  
  23. " download vim-plug and install plugins if vim started without plug.
  24. if empty(glob('~/.vim/autoload/plug.vim'))
  25.   silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
  26.         \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  27.   autocmd VimEnter * PlugInstall | source $MYVIMRC
  28. endif
  29.  
  30. " plug plugin setup.
  31. call plug#begin('~/.vim/plugged')
  32.  
  33. " Automatically install missing plugins on startup. [commented to improve startup]
  34. if !empty(filter(copy(g:plugs), '!isdirectory(v:val.dir)'))
  35.   autocmd VimEnter * PlugInstall | q
  36. endif
  37.  
  38. Plug 'tomasr/molokai'
  39. Plug 'ajh17/Spacegray.vim'
  40. Plug 'morhetz/gruvbox'          " currently in use
  41.  
  42. Plug 'xolox/vim-notes'| Plug 'xolox/vim-misc'
  43.  
  44. Plug 'tpope/vim-fugitive'       " to handle git commands
  45. Plug 'airblade/vim-gitgutter'   " to see git diff
  46.  
  47. Plug 'alvan/vim-closetag'       " to close markup lang tags
  48. Plug 'tpope/vim-surround'       " to surround text with tags
  49.  
  50. Plug 'mileszs/ack.vim'          " ag.vim is no longer maintained.
  51. Plug 'sjl/gundo.vim'            " to see vim history-tree
  52. " {{{ command-t when ruby support available else ctrlp
  53. Plug 'wincent/command-t', has('ruby') ? {
  54.     \ 'do': 'cd ruby/command-t/ext/command-t && ruby extconf.rb && make'
  55.     \ }:{ 'on': [] }
  56. " install 'the_silver_searcher for speeding up ack and ctrlp.
  57. " github.com/ggreer/the_silver_searcher
  58. Plug 'ctrlpvim/ctrlp.vim', has('ruby')?{'on':[]}:{}
  59. " }}}
  60.  
  61. Plug 'w0rp/ale'                 " asynchronous linting engine
  62. Plug 'scrooloose/vim-slumlord'  " inline previews for plantuml acitvity dia
  63. Plug 'aklt/plantuml-syntax'     " syntax/linting for plantuml
  64.  
  65. " considerable plugins
  66. " deoplete.nvim (async completion for nvim/vim8)(ycm alter)
  67. " vimwiki (alternative of vim-notes)
  68. " Plug 'ying17zi/vim-live-latex-preview'
  69. " Plug 'LaTeX-Box-Team/LaTeX-Box'
  70. " ultisnips
  71. " markdown
  72. " indentmarkers
  73. " vinegar
  74.  
  75. call plug#end()
  76.  
  77. " }}}
  78.  
  79. "------------------------------------------------------------
  80. " MISC {{{
  81. "------------------------------------------------------------
  82.  
  83. " set nocompatible              " commented: r/vim/wiki/vimrctips
  84. let mapleader=','               " leader is comma
  85. set nostartofline               " Make j/k respect the columns
  86. set clipboard=unnamedplus       " to use operating system clipboard
  87. set history=1000                " set how many lines of history vim has to remember
  88. set autoread                    " set the file to autoread when a file is changed from outside
  89. set encoding=utf-8              " set vim encoding to utf-8
  90. set fileencoding=utf-8          " set vim encoding to utf-8
  91. set esckeys                     " Allow cursor keys in insert mode.
  92. set title                       " change the terminal's title
  93. set spelllang=en                " 'en_gb' sets region to British English. use 'en' for all regions
  94. set noswapfile                  " stops vim from creating a .swp file
  95. " set nobackup                  " gives no error when same file being edited by multiple vim sessions
  96. set textwidth=0                 " no automatic linefeeds in insert mode
  97. set wrap                        " word wrap the text(normal/visual)
  98. set visualbell                  " don't beep
  99. set noerrorbells                " don't beep
  100. set colorcolumn=100             " highlight on col 100
  101. set backspace=indent,eol,start  " allow backspacing over everything in insert mode
  102. set diffopt+=vertical           " for vim-fugitive to vs on diff
  103. syntax enable                   " enable syntax processing
  104. " clearing the t_vb variable deactivates flashing
  105. set t_vb=
  106. " stackoverflow.com/questions/21618614/vim-shows-garbage-characters
  107. set t_RV=
  108. " jk/kj is escape
  109. inoremap jk <ESC>
  110. inoremap kj <ESC>
  111. " an attempt to prevent one key press
  112. noremap ; :
  113. " ignore compiled files
  114. set wildignore=*.o,*~,*.pyc,*.so,*.out,*.log,*.aux,*.bak,*.swp,*.class
  115. if has("win16") || has("win32")
  116.     set wildignore+=.git\*,.hg\*,.svn\*
  117. else
  118.     set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
  119. endif
  120.  
  121. "insert datetime in the format specified on <F9>
  122. nnoremap <F9> "=strftime("%Y-%m-%d")<CR>P
  123. inoremap <F9> <C-R>=strftime("%Y-%m-%d")<CR>
  124. " }}}
  125.  
  126. "------------------------------------------------------------
  127. " COLORS    {{{
  128. "------------------------------------------------------------
  129.  
  130. set background=dark
  131.  
  132. " :call ShowColorSchemeName() to show the current colorscheme that vim is using[custom fn]
  133. if $TERM == "xterm-256color" || $TERM == "screen-256color" || $COLORTERM == "gnome-terminal"
  134.   " github.com/neovim/neovim/issues/7722
  135.   " setting term blindly might be the issue with garbage rendering
  136.   " was easily reproducibe using ctrl+i in vim 8.1
  137.   " set term=screen-256color "set teminal color to support 256 colors
  138. endif
  139.  
  140. try
  141.   "colorscheme molokai
  142.   "colorscheme spacegray
  143.   colorscheme gruvbox
  144. catch
  145.   colorscheme desert
  146. endtry
  147.  
  148.  
  149. " molokai theme - plugin config
  150. " let g:molokai_original=1
  151.  
  152.  
  153. " spacegray theme - plugin config
  154. " let g:spacegray_low_contrast = 1
  155. " let g:spacegray_use_italics = 1
  156. " let g:spacegray_underline_search = 1
  157.  
  158. " gruvbox - plugin config
  159. let g:gruvbox_contrast_dark='soft'
  160.  
  161. " }}}
  162.  
  163. "------------------------------------------------------------
  164. " SPACES AND TABS  {{{
  165. "------------------------------------------------------------
  166.  
  167. set autoindent
  168. set cindent       " better alternative to smartindent
  169. set expandtab     " tabs are spaces
  170. " set tabstop=2   " commented: r/vim/wiki/tabstop
  171. set shiftwidth=2
  172. set softtabstop=2 " number of spaces in TAB when editing
  173.  
  174.  
  175. " }}}
  176.  
  177. "------------------------------------------------------------
  178. " UI CONFIG  {{{
  179. "------------------------------------------------------------
  180.  
  181. set number          " show line numbers
  182. set relativenumber  " show relative line number
  183. set showcmd         " shows last entered command in bottom right bar, not working
  184. set cursorline      " highlight current line
  185. set scrolloff=5     " minimum line offset to present on screen while scrolling.
  186.  
  187. " removed the below filetype plugin block as vim-plug handles it internally
  188. " filetype on "required
  189. " filetype off "required
  190. " filetype plugin indent on    " required
  191.  
  192.  
  193. "filetype indent on " load filetype-specific indent files ~/.vim/indent/python.vim
  194.  
  195. set splitright
  196. set splitbelow
  197.  
  198. "matching pair of braces
  199. inoremap {      {}<Left>
  200. inoremap {<CR>  {<CR>}<Esc>O
  201. " inoremap {{     {
  202. inoremap {}     {}
  203.  
  204. "matching pair of square brackets
  205. inoremap [      []<Left>
  206. inoremap [<CR>  [<CR>]<Esc>O
  207. " inoremap [[     [
  208. inoremap []     []
  209.  
  210. "handling paranthesis
  211. inoremap (      ()<Left>
  212. inoremap (<CR>  (<CR>)<Esc>O
  213. " inoremap ((     (
  214. inoremap ()     ()
  215.  
  216. " "handling angular brackets
  217. " inoremap <      <><Left>
  218. " inoremap <<CR>  <<CR>><Esc>O
  219. " inoremap <<     <
  220. " inoremap <>     <>
  221.  
  222. set wildmode=longest,list,full
  223. set wildmenu    " visual autocomplete for command menu
  224. set lazyredraw  " redraw only when needed
  225. set showmatch   " highlight matching [{()}]
  226.  
  227. "------------------------------------------------------------
  228. " STATUSLINE {{{
  229. "------------------------------------------------------------
  230.  
  231. set laststatus=2  " status line always enabled
  232.  
  233. let g:currentmode={  
  234.       \ 'n'  : 'N ',
  235.       \ 'no' : 'N·Operator Pending ',
  236.       \ 'v'  : 'V ',
  237.       \ 'V'  : 'V·Line ',
  238.       \ '^V' : 'V·Block ',
  239.       \ 's'  : 'Select ',
  240.       \ 'S'  : 'S·Line ',
  241.       \ '^S' : 'S·Block ',
  242.       \ 'i'  : 'I ',
  243.       \ 'R'  : 'R ',
  244.       \ 'Rv' : 'V·Replace ',
  245.       \ 'c'  : 'Command ',
  246.       \ 'cv' : 'Vim Ex ',
  247.       \ 'ce' : 'Ex ',
  248.       \ 'r'  : 'Prompt ',
  249.       \ 'rm' : 'More ',
  250.       \ 'r?' : 'Confirm ',
  251.       \ '!'  : 'Shell ',
  252.       \ 't'  : 'Terminal ' }
  253.  
  254. " Automatically change the statusline color depending on mode
  255. function! ChangeStatuslineColor()
  256.   if (mode() =~# '\v(n|no)')
  257.     exe 'hi! StatusLine ctermfg=008'
  258.   elseif (mode() =~# '\v(v|V)'
  259.         \ || g:currentmode[mode()] ==# 'V·Block'
  260.         \ || get(g:currentmode, mode(), '') ==# 't')
  261.     exe 'hi! StatusLine ctermfg=005'
  262.   elseif (mode() ==# 'i')
  263.     exe 'hi! StatusLine ctermfg=004'
  264.   else
  265.     exe 'hi! StatusLine ctermfg=006'
  266.   endif
  267.  
  268.   return ''
  269. endfunction
  270.  
  271. " Function: display errors from Ale in statusline
  272. function! LinterStatus() abort
  273.   let l:counts = ale#statusline#Count(bufnr(''))
  274.   let l:all_errors = l:counts.error + l:counts.style_error
  275.   let l:all_non_errors = l:counts.total - l:all_errors
  276.   return l:counts.total == 0 ? '' : printf(
  277.   \ 'W:%d E:%d',
  278.   \ l:all_non_errors,
  279.   \ l:all_errors
  280.   \)
  281. endfunction
  282.  
  283. " General Format: %-0{minwid}.{maxwid}{item}
  284. " Higlight Groups: #<format-name>#  -> see :help hl for more group names
  285.  
  286. set statusline=                         " clear statusline
  287. "set statusline+=%{ChangeStatuslineColor()}               " Changing the statusline color
  288. set statusline+=%#PmenuSel#             " set hl group to : popup menu normal line
  289. set statusline+=%.15{StatuslineGit()}   " get git branch name[max width of 15]
  290. set statusline+=%#WildMenu#            " set hl group to : directory listing style
  291. set statusline+=\ %f                    " file name
  292.  
  293.  
  294. set statusline+=%r                      " read only flag
  295. set statusline+=%=                      " switching to the right side
  296. set statusline+=%#ErrorMsg#             " set hl group to : error message style
  297. set statusline+=%{LinterStatus()}   " show the error message from ALE plugin
  298. set statusline+=%#LineNr#
  299. set statusline+=%y                      " file type
  300. set statusline+=[%{&fileencoding?&fileencoding:&encoding}]     " file encoding
  301. set statusline+=[%{&fileformat}\]       " file format[unix/dos]
  302. set statusline+=\ %3p%%                 " file position percentage
  303. set statusline+=%#CursorLineNr#
  304. set statusline+=\ %4l:%-3c              " line[width-4ch, padding-left]:col[width-3ch, padding-right]
  305. set statusline+=%*                      " switch back to normal statusline highlight
  306. set statusline+=\ %6L                   " number of lines in buffer[width-6ch, padding-left]
  307. set statusline+=%#ModeMsg#
  308. set statusline+=\%3{toupper(get(g:currentmode,strtrans(mode())))} " Current mode
  309.  
  310. " }}}
  311.  
  312. "------------------------------------------------------------
  313. " SEARCHING  {{{
  314. "------------------------------------------------------------
  315.  
  316. set ignorecase    " use case insensitive search
  317. set smartcase     " except when using capital letters
  318. set incsearch     " incremental search. search as chars are enetered
  319. set hlsearch      " highlight matches
  320. set gdefault      " RegExp global by default
  321. set magic         " Enable extended regexes.
  322.  
  323. " turn off search highlight
  324. nnoremap <leader><space> :nohlsearch<CR>
  325.  
  326. " Visual mode pressing * or # searches for the current selection
  327. " visual selection is custom function. [see the section]
  328. vnoremap <silent> * :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR>
  329. vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>
  330.  
  331. " highlight last inserted text *not working
  332. " nnoremap gV `[v`]
  333.  
  334. " Folding {{{
  335. set foldenable          " enable folding
  336. set foldlevelstart=10   " open most folds by default
  337. set foldnestmax=10      " max 10 nested folds
  338. " space open/closes folds in current block
  339. nnoremap <space> za
  340. " foldmethod values: indent, marker, manual, expr, diff, syntax
  341. set foldmethod=marker   " no plugin for syntax yet.
  342.  
  343. " }}}
  344.  
  345. " }}}
  346.  
  347. "------------------------------------------------------------
  348. " MOVEMENTS  {{{
  349. "------------------------------------------------------------
  350.  
  351. " move vertically by visual line(normal/visual mode)
  352. noremap j gj
  353. noremap k gk
  354.  
  355. " move to end/beginning of line(normal/visual  mode)
  356. noremap E $
  357. noremap B ^
  358.  
  359. " $/^ doesn't do anything(normal/visual mode)
  360. noremap $ <nop>
  361. noremap ^ <nop>
  362.  
  363. "split navigations
  364. nnoremap <C-J> <C-W><C-J>
  365. nnoremap <C-K> <C-W><C-K>
  366. nnoremap <C-L> <C-W><C-L>
  367. nnoremap <C-H> <C-W><C-H>
  368.  
  369.  
  370. " }}}
  371.  
  372. "------------------------------------------------------------
  373. " LEADER SHORTCUTS  {{{
  374. "------------------------------------------------------------
  375.  
  376. " toggle line numbers
  377. nnoremap <leader>tn :set number!<CR>
  378. nnoremap <leader>trn :set relativenumber!<CR>
  379.  
  380. " <leader>k is move right one space
  381. inoremap <leader>k <right>
  382.  
  383. " edit/load vimrc/bashrc
  384. nnoremap <leader>ev :vsp $MYVIMRC<CR>
  385. nnoremap <leader>eb :vsp ~/.bashrc<CR>
  386. nnoremap <leader>sv :source $MYVIMRC<CR>
  387.  
  388. " save session.
  389. " nnoremap <leader>s :mksession<CR>
  390.  
  391. " Remove the Windows ^M - when the encodings gets messed up
  392. noremap <leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
  393.  
  394. " stage current file in git
  395. nnoremap <leader>ga :!git add %<CR>
  396.  
  397. "spell check toggle
  398. nnoremap <leader>s :set spell!<cr>
  399.  
  400.  
  401. " }}}
  402.  
  403. "------------------------------------------------------------
  404. " PLUGIN SETTINGS {{{
  405. "------------------------------------------------------------
  406.  
  407. " gitgutter - plugin config {{{
  408.  
  409. set updatetime=1000                 "wait how much time to detect file update
  410. let g:gitgutter_max_signs = 500     "threshold upto which gitgutter shows sign
  411. let g:gitgutter_highlight_lines = 1
  412.  
  413. nnoremap gn :GitGutterNextHunk<CR>
  414. nnoremap gp :GitGutterPrevHunk<CR>
  415. nnoremap <leader>hs :GitGutterStageHunk<CR>
  416. nnoremap <leader>hu :GitGutterUndoHunk<CR>
  417. nnoremap <leader>hp :GitGutterPreviewHunk<CR>
  418.  
  419. nnoremap <leader>ggt <esc>:GitGutterToggle<cr>
  420.  
  421. if exists('&signcolumn')  " vim 7.4.2201+
  422.   set signcolumn=yes
  423. else
  424.   let g:gitgutter_sign_column_always = 1
  425. endif
  426. "}}}
  427.  
  428.  
  429. " vim-closetag - plugin config {{{
  430. let g:closetag_filenames = '*.html,*.xhtml,*.phtml'
  431. let g:closetag_xhtml_filenames = '*.xhtml,*.jsx'
  432. let g:closetag_emptyTags_caseSensitive = 1
  433. let g:closetag_shortcut = '>'               " Shortcut for closing tags, default is '>'
  434. let g:closetag_close_shortcut = '<leader>>' " Add > at current position without closing the current tag, default is ''
  435. "}}}
  436.  
  437.  
  438. "vim notes - plugin config {{{
  439. let g:notes_directories = ['~/dotfiles/vim/notes']
  440. let g:notes_list_bullets = ['*', '-', '+']
  441. let g:notes_unicode_enabled = 0
  442. " let g:notes_suffix = '.md'
  443. let g:notes_title_sync='change-title'
  444. vnoremap <leader>ns :NoteFromSelectedText<CR>
  445. nnoremap <C-e> :edit note:
  446. "}}}
  447.  
  448. " ack.vim - plugin config {{{
  449. if executable('ag')
  450.   let g:ackprg = 'ag --nogroup --nocolor --column --heading --follow --smart-case'
  451.   "search in pwd. [!] if not given, the first occurence is jumped to.
  452. endif
  453.  
  454. nnoremap <leader>a :Ack!<space>
  455.  
  456. " }}}
  457.  
  458. "command-t - plugin config {{{
  459.  
  460. " open cmd-t window
  461. nnoremap <leader>t :CommandT<CR>
  462. nnoremap <leader>tp :CommandT
  463. " change pwd to root git dir
  464. nnoremap <leader>gr :call CD_Git_Root()<cr>
  465. " add wildignore filetypes from .gitignore
  466. nnoremap <leader>cti :call WildignoreFromGitignore()<cr>
  467. if has('ruby')
  468.   " with ruby support use command-t
  469.   " start command-t to find files in notes directory.
  470.   nnoremap <leader>fn :CommandT /mnt/windows/projects/notes<cr>
  471. else
  472.   " with no ruby support in vim, use ctrl-p + ag(silver search for vim)
  473.   let g:ctrlp_match_window = 'bottom,order:ttb'                  " top-to-bottom filename matching
  474.   let g:ctrlp_switch_buffer = 0                                  " always open file in new buffer
  475.   let g:ctrlp_working_path_mode = 0                              " ability to change pwd in vim session
  476.   let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""' " use ag to search
  477. endif
  478.  
  479. "}}}
  480.  
  481. " }}}
  482.  
  483. "------------------------------------------------------------
  484. " AUTO COMMANDS   {{{
  485. "------------------------------------------------------------
  486.  
  487. " group au commands: so they won't be added when vimrc sourced again
  488. augroup autogroup
  489.     " Remove all auto-commands from the group autogroup
  490.     autocmd!
  491.  
  492.     " latex compilation shell commands. req: (pdf|xe)latex
  493.     autocmd filetype tex nnoremap <buffer> <leader>t :!pdflatex % <CR>
  494.     autocmd filetype tex nnoremap <buffer> <leader>x :!xelatex % <CR>
  495.    
  496.     autocmd filetype cpp nnoremap <C-c> :w <bar> !clear && g++ -std=gnu++14 -g -D fio -O2 % -o %:p:h/%:t:r.out && ./%:r.out<CR>
  497.     autocmd filetype c nnoremap <C-c> :w <bar> !gcc -std=c99 -lm % -o %:p:h/%:t:r.out && ./%:r.out<CR>
  498.     autocmd filetype java nnoremap <C-c> :w <bar> !javac % && java -enableassertions %:p <CR>
  499.     autocmd filetype python nnoremap <C-c> :w <bar> !python % <CR>
  500.  
  501.     autocmd filetype go nnoremap <C-c> :w <bar> !go build % && ./%:p <CR>
  502.     autocmd FocusLost * :wall          " Save on lost focus
  503.     autocmd VimEnter * redraw!
  504.  
  505. augroup END
  506.  
  507. " }}}
  508.  
  509. "------------------------------------------------------------
  510. " CUSTOM FUNCTIONS {{{
  511. "------------------------------------------------------------
  512.  
  513.  
  514. function! GitBranch()
  515.   return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
  516. endfunction
  517.  
  518. function! StatuslineGit()
  519.   let l:branchname = GitBranch()
  520.   return strlen(l:branchname) > 0?'  '.l:branchname.' ':''
  521. endfunction
  522.  
  523.  
  524. function! VisualSelection(direction, extra_filter) range
  525.     let l:saved_reg = @"
  526.     execute "normal! vgvy"
  527.  
  528.     let l:pattern = escape(@", "\\/.*'$^~[]")
  529.    let l:pattern = substitute(l:pattern, "\n$", "", "")
  530.  
  531.    if a:direction == 'gv'
  532.        call CmdLine("Ack '" . l:pattern . "' " )
  533.    elseif a:direction == 'replace'
  534.        call CmdLine("%s" . '/'. l:pattern . '/')
  535.    endif
  536.  
  537.    let @/ = l:pattern
  538.    let @" = l:saved_reg
  539. endfunction
  540.  
  541.  
  542. function! Git_Repo_Cdup() " Get the relative path to repo root
  543.    "Ask git for the root of the git repo (as a relative '../../' path)
  544.    let git_top = system('git rev-parse --show-cdup')
  545.    let git_fail = 'fatal: Not a git repository'
  546.    if strpart(git_top, 0, strlen(git_fail)) == git_fail
  547.        " Above line says we are not in git repo. Ugly. Better version?
  548.        return ''
  549.    else
  550.        " Return the cdup path to the root. If already in root,
  551.        " path will be empty, so add './'
  552.        return './' . git_top
  553.    endif
  554. endfunction
  555.  
  556. function! CD_Git_Root()
  557.    execute 'cd '.Git_Repo_Cdup()
  558.    let curdir = getcwd()
  559.    echo 'CWD now set to: '.curdir
  560. endfunction
  561.  
  562.  
  563. " Define the wildignore from gitignore. Primarily for CommandT
  564. function! WildignoreFromGitignore()
  565.    silent call CD_Git_Root()
  566.    let gitignore = '.gitignore'
  567.    if filereadable(gitignore)
  568.        let igstring = ''
  569.        for oline in readfile(gitignore)
  570.            let line = substitute(oline, '\s|\n|\r', '', "g")
  571.            if line =~ '^#' | con | endif
  572.            if line == '' | con  | endif
  573.            if line =~ '^!' | con  | endif
  574.            if line =~ '/$' | let igstring .= "," . line . "*" | con | endif
  575.            let igstring .= "," . line
  576.        endfor
  577.        let execstring = "set wildignore+=".substitute(igstring,'^,','',"g")
  578.        execute execstring
  579.        echo 'Wildignore defined from gitignore in: '.getcwd()
  580.    else
  581.        echo 'Unable to find gitignore'
  582.    endif
  583. endfunction
  584.  
  585. function! ShowColorSchemeName()
  586.    try
  587.        echo g:colors_name
  588.    catch /^Vim:E121/
  589.        echo "default
  590.    endtry
  591. endfunction
  592.  
  593. " }}}
  594.  
  595. "------------------------------------------------------------
  596. " SOURCE VIM CONFIGS  {{{
  597. "------------------------------------------------------------
  598.  
  599. " dougblack.io/words/a-good-vimrc.html
  600. " realpython.com/blog/python/vim-and-python-a-match-made-in-heaven/
  601. " witkowskibartosz.com/blog/gitgutter-vim-plugin.html
  602. " github.com/amix/vimrc/tree/master/vimrcs
  603. " vimcasts.org/episodes/spell-checking/
  604. " nvie.com/posts/how-i-boosted-my-vim/
  605. " medium.com/usevim/vim-101-set-hidden-f78800142855
  606. " devel.tech/snippets/n/vIMmz8vZ/minimal-vim-configuration-with-vim-plug/#putting-it-all-together
  607. " naperwrimo.org/wiki/index.php?title=Vim_for_Writers
  608. " ctoomey.com/writing/command-t-optimized/
  609. " ddrscott.github.io/blog/2016/side-search/#haven't_checked_yet
  610. " hackernoon.com/the-last-statusline-for-vim-a613048959b2
  611. " r/vim
  612.  
  613. " }}}
  614.  
  615. "------------------------------------------------------------
  616. " END
  617. "------------------------------------------------------------
Add Comment
Please, Sign In to add comment