Skip to content

Instantly share code, notes, and snippets.

@malandro-sv
Last active September 4, 2020 17:52
Show Gist options
  • Select an option

  • Save malandro-sv/889e3636931857f6c7f3a3cf18ce867e to your computer and use it in GitHub Desktop.

Select an option

Save malandro-sv/889e3636931857f6c7f3a3cf18ce867e to your computer and use it in GitHub Desktop.
MMXX
" GistID:889e3636931857f6c7f3a3cf18ce867e
" June 2020.
set nocompatible
filetype off
syntax on
filetype plugin indent on
" April 17, 2019. omnifunc for js according to
" medium.com/vim-drops/javascript-autocompletion-on-vim-4fea7f6934e2:
autocmd FileType plygin on
set omnifunc=syntaxcomplete#Complete
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'mattn/gist-vim'
Plugin 'mattn/webapi-vim'
Plugin 'VundleVim/Vundle.vim'
Plugin 'wikitopian/hardmode'
Plugin 'scrooloose/nerdtree.git'
Plugin 'mattn/lisper-vim'
" Python devin' Feb 28 2019:
Plugin 'pignacio/vim-yapf-format'
Plugin 'majutsushi/tagbar'
Plugin 'motemen/git-vim'
Plugin 'rosenfeld/conque-term'
Plugin 'fisadev/FixedTaskList.vim'
Plugin 'scrooloose/syntastic'
Plugin 'davidhalter/jedi-vim'
" js autocomplete, April 17, 2020:
" had to npm install from ~./vim/bundle/tern_for_vim directory.
Plugin 'ternjs/tern_for_vim', { 'do' : 'npm install' }
call vundle#end()
" colo ron
colo default
set nu!
set ls =2
set ts =4
set showmatch
set autoindent
set shiftwidth =4
let python_hightlight_all =1
set cursorline
" March 11th, 2019, python indent:
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
" May 6th - 7th 2019;
" current line highlighting,
" ErrorMsg color customization:
" hi cursorLine cterm=bold ctermbg=blue ctermfg=white guibg=darkred guifg=white
hi ErrorMsg term=reverse cterm=bold ctermbg=1 guifg=White guibg=Red
hi Error term=reverse cterm=bold ctermbg=1 guifg=White guibg=Red
set statusline+=%#warningmsg#
set statusline+={SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_ilst=1
let g:syntastic_auto_loc_list=1
let g:syntastic_check_on_open=1
let g:syntastic_check_on_wq=0
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
" CSS autocompletion, July 2018:
" autocmd FileType css set omnifunc=csscomplete#CompleteCSS
" HardMode enabled by default at startup:
" autocmd VimEnter,BufNewFile,BufReadPost * silent! call HardMode()
" I added VILlisp at some point and realized I might not need it:
" autocmd BufRead,BufNewFile *.lsp,*.lisp
" automatically remove trailing whitespaces
" upon writing to buffer (March 11th, 2019):
autocmd BufWritePre * %s/\s\+$//e
" This is to avoid using Ctrl W + direction when using split windows:
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" This is to have the new split window appear at the right bottom:
set splitbelow
set splitright
" July 2018, adding skeleton html.
if has("autocmd")
augroup templates
autocmd BufNewFile *.html 0r ~/.vim/templates/skeleton.html
augroup END
endif
" NERDTree customizations, Oct 3rd, 2018:
" launch on startup:
autocmd vimenter * NERDTree
" Oct 8th, let NERDTree see dotfiles:
let NERDTreeShowHidden = 1
" opens NTree even if no files are specified:
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" opens NTree even if Vim starts up opening a directory:
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
" closes Vim if the only open buffer is NERDTree:
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
map <C-n> :NERDTreeToggle<CR>
let g:NERDTreeDirArrowExpandable = '>'
let g:NERDTreeDirArrowCollapsible = '.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment