Skip to content

Instantly share code, notes, and snippets.

@limi58
Last active August 2, 2018 15:26
Show Gist options
  • Save limi58/5e264bbaf44ae74f418d5a73b601ab77 to your computer and use it in GitHub Desktop.
Save limi58/5e264bbaf44ae74f418d5a73b601ab77 to your computer and use it in GitHub Desktop.
vim
set number
set expandtab
set ts=2
set sw=2
set scrolloff=10
syntax enable
syntax on
set laststatus=2
set autoindent
set tabstop=2
set ai!
set cindent
set smartindent
set shiftwidth=2
set showmatch
set hlsearch
set pastetoggle=<F9>
set clipboard=unnamed
colorscheme onedark
let mapleader=','
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'SirVer/ultisnips'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
execute pathogen#infect()
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlPMRU'
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*/node_modules/* " MacOSX/Linux
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
if (empty($TMUX))
if (has("nvim"))
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
if (has("termguicolors"))
set termguicolors
endif
endif
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-j>"
let g:UltiSnipsJumpBackwardTrigger="<c-k>"
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical""map :silent! NERDTreeToggle
" NERDTree
let NERDTreeShowHidden=1
let NERDTreeIgnore=['\.DS_Store','\.swp', 'node_modules', '.git']
" emmet
let g:user_emmet_settings = {
\ 'javascript' : {
\ 'extends' : 'jsx',
\ },
\}
autocmd FileType html,css,javascript EmmetInstall
snippet fun "function" w
function $1 ($2) {
$3
}
endsnippet
snippet addE "addEventListener" w
addEventListener('$1', e => $2)
endsnippet
snippet log "console" w
console.log($1)
endsnippet
snippet stop "stopPropagation" w
stopPropagation()
endsnippet
snippet pre "preventDefault" w
preventDefault()
endsnippet
snippet setT "setTimeout" w
setTimeout(() => {
$1
}, $2)
endsnippet
snippet setI "setInterval" w
setInterval(() => {
$1
}, $2)
endsnippet
snippet mo "" w
module.exports = $1
endsnippet
snippet imp "" w
import ${2:name} from '$1'
endsnippet
snippet req "" w
const $1 = require('$2')
endsnippet
snippet for "" w
for (let $1 = $2; $1 < $3; $1 ++) {
$4
}
endsnippet
snippet if "" w
if ($1) {
$2
}
endsnippet
snippet f "" w
($1) {
$2
}
endsnippet
snippet class "" w
class $1 extends $2 {
constructor () {}
$3
}
endsnippet
snippet switch "" w
switch ($1) {
case $2:
$3
break
default:
break
}
endsnippet
snippet ( "" w
($1)$2
endsnippet
snippet " "" w
"$1"$2
endsnippet
snippet [ "" w
[$1]$2
endsnippet
snippet { "" w
{$1}$2
endsnippet

Vundle.vim ctrlp.vim nerdtree ultisnips vim-airline vim-bookmarks vim-commentary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment