Skip to content

Instantly share code, notes, and snippets.

@c33k
Last active March 18, 2020 09:02
Show Gist options
  • Select an option

  • Save c33k/c2b1bebd68e831ef7645ea73065f09c5 to your computer and use it in GitHub Desktop.

Select an option

Save c33k/c2b1bebd68e831ef7645ea73065f09c5 to your computer and use it in GitHub Desktop.

Revisions

  1. c33k revised this gist Mar 18, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    "First, install: dein and NerdTree

    if &compatible
    set nocompatible
    endif
  2. c33k revised this gist Mar 18, 2020. 1 changed file with 20 additions and 36 deletions.
    56 changes: 20 additions & 36 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -1,45 +1,25 @@
    if &compatible
    set nocompatible
    endif
    set nocompatible
    endif
    " Add the dein installation directory into runtimepath
    set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim

    set runtimepath+=/Users/rltoscano/.vim/bundles/repos/github.com/Shougo/dein.vim
    if dein#load_state('~/.cache/dein')
    call dein#begin('~/.cache/dein')

    if dein#load_state('/Users/rltoscano/.vim/bundles')
    call dein#begin('/Users/rltoscano/.vim/bundles')
    call dein#add('/Users/rltoscano/.vim/bundles/repos/github.com/Shougo/dein.vim')
    call dein#add('Shougo/neosnippet.vim')
    call dein#add('Shougo/neosnippet-snippets')
    call dein#add('Shougo/vimshell', { 'rev': '3787e5' })
    call dein#end()
    call dein#save_state()
    call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim')
    call dein#add('Shougo/deoplete.nvim')
    if !has('nvim')
    call dein#add('roxma/nvim-yarp')
    call dein#add('roxma/vim-hug-neovim-rpc')
    endif

    filetype plugin indent on
    syntax enable

    set exrc
    set secure
    call dein#end()
    call dein#save_state()
    endif

    execute pathogen#infect()
    syntax on
    filetype plugin indent on
    let g:javascript_plugin_jsdoc = 1
    let g:javascript_plugin_flow = 1
    filetype plugin indent on


    " STATUS LINE CONFIG
    "
    function! LinterStatus() abort
    let l:counts = ale#statusline#Count(bufnr(''))
    let l:all_errors = l:counts.error + l:counts.style_error
    let l:all_non_errors = l:counts.total - l:all_errors
    return l:counts.total == 0 ? '' : printf(
    \ 'W:%d E:%d',
    \ l:all_non_errors,
    \ l:all_errors
    \)
    endfunction
    syntax enable

    set laststatus=2
    set statusline=
    @@ -77,4 +57,8 @@ set expandtab
    highlight OverLength ctermbg=red ctermfg=white guibg=#592929
    match OverLength /\%81v.\+/
    set colorcolumn=80
    set number
    set number

    " Starting NerdTREE automatically when no file is open
    autocmd StdinReadPre * let s:std_in=1
    autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
  3. c33k revised this gist Apr 6, 2019. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion .vimrc
    Original file line number Diff line number Diff line change
    @@ -71,4 +71,10 @@ set tabstop=4
    set shiftwidth=4

    " On pressing tab, insert 4 spaces
    set expandtab
    set expandtab

    " styling a red column for 80 characters and add line numbers
    highlight OverLength ctermbg=red ctermfg=white guibg=#592929
    match OverLength /\%81v.\+/
    set colorcolumn=80
    set number
  4. c33k revised this gist Jan 12, 2018. 1 changed file with 23 additions and 1 deletion.
    24 changes: 23 additions & 1 deletion .vimrc
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,33 @@
    if &compatible
    set nocompatible
    endif

    set runtimepath+=/Users/rltoscano/.vim/bundles/repos/github.com/Shougo/dein.vim

    if dein#load_state('/Users/rltoscano/.vim/bundles')
    call dein#begin('/Users/rltoscano/.vim/bundles')
    call dein#add('/Users/rltoscano/.vim/bundles/repos/github.com/Shougo/dein.vim')
    call dein#add('Shougo/neosnippet.vim')
    call dein#add('Shougo/neosnippet-snippets')
    call dein#add('Shougo/vimshell', { 'rev': '3787e5' })
    call dein#end()
    call dein#save_state()
    endif

    filetype plugin indent on
    syntax enable

    set exrc
    set secure

    execute pathogen#infect()
    syntax on
    filetype plugin indent on
    let g:javascript_plugin_jsdoc = 1
    let g:javascript_plugin_flow = 1
    filetype plugin indent on


    " STATUS LINE CONFIG
    "
    function! LinterStatus() abort
    @@ -41,7 +64,6 @@ hi TabLine ctermfg=Black ctermbg=White
    hi TabLineSel ctermfg=LightBlue ctermbg=Black

    " EDITOR GENERAL CONFIGS

    " show existing tab with 4 spaces width
    set tabstop=4

  5. c33k created this gist Jan 12, 2018.
    52 changes: 52 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,52 @@
    execute pathogen#infect()
    syntax on
    filetype plugin indent on
    let g:javascript_plugin_jsdoc = 1
    let g:javascript_plugin_flow = 1
    filetype plugin indent on

    " STATUS LINE CONFIG
    "
    function! LinterStatus() abort
    let l:counts = ale#statusline#Count(bufnr(''))
    let l:all_errors = l:counts.error + l:counts.style_error
    let l:all_non_errors = l:counts.total - l:all_errors
    return l:counts.total == 0 ? '' : printf(
    \ 'W:%d E:%d',
    \ l:all_non_errors,
    \ l:all_errors
    \)
    endfunction

    set laststatus=2
    set statusline=
    set statusline+=%#function#\ %l
    set statusline+=\ %*
    set statusline+=\ ‹‹
    set statusline+=\ %f\ %*
    set statusline+=\ ››
    set statusline+=\ %m
    set statusline+=%#keyword#\ %F
    set statusline+=%=
    set statusline+=\ ‹‹
    set statusline+=\ %{strftime('%R',getftime(expand('%')))}
    set statusline+=\ ::
    set statusline+=\ %n
    set statusline+=\ ››\ %*

    " TAB COLORS

    hi TabLineFill ctermfg=LightBlue ctermbg=DarkBlue
    hi TabLine ctermfg=Black ctermbg=White
    hi TabLineSel ctermfg=LightBlue ctermbg=Black

    " EDITOR GENERAL CONFIGS

    " show existing tab with 4 spaces width
    set tabstop=4

    " when indenting with '>', use 4 spaces width
    set shiftwidth=4

    " On pressing tab, insert 4 spaces
    set expandtab