Skip to content

Instantly share code, notes, and snippets.

@MJ111
Last active January 21, 2017 14:18
Show Gist options
  • Select an option

  • Save MJ111/6333116d692ab02ba5af7d372cacd96a to your computer and use it in GitHub Desktop.

Select an option

Save MJ111/6333116d692ab02ba5af7d372cacd96a to your computer and use it in GitHub Desktop.
vimconfig
" after the plugins loaded
set foldlevel=10
set foldmethod=syntax
set clipboard=unnamed
set autoindent
filetype plugin indent on
color monokai-javascript
"nnoremap bp <C-B>
"nnoremap fp <C-F>
noremap <S-Down> ''
noremap <S-Up> ''
" show full file path
nnoremap <leader>fp :echo expand('%:p')<cr>
" delete a line when insert mode and back to insert mode
inoremap <d-d> <esc>ddi
" change to uppercase in inner word when insert mode and back to insert mode
inoremap <c-u> <esc>viwUi
" move cursor to first character when nomal mode
noremap <c-[> ^
" move curser to last character when nomal mode
noremap <c-]> $
" delete character at cursor's left
nnoremap <bs> i<bs><esc>l
" delete character at curosr's right
nnoremap <c-bs> a<bs><esc>l
inoremap <c-bs> <esc>la<bs>
" moving in split panes
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>
" open new split panes to right and bottom
set splitbelow
set splitright
" control pane size
nnoremap <leader>l <c-w>>10
nnoremap <leader>h <c-w><10
nnoremap <leader>k <c-w>+10
nnoremap <leader>j <c-w>-10
" nerdtree
nnoremap ,n :NERDTreeToggle<CR>
vnoremap <esc> <esc>
" git commit
nnoremap <leader>gc :Gcommit -v<CR>
" open current file in chrome
nnoremap <silent> <leader>ch :exec 'silent !open -a "Google Chrome" % &'<CR>
set encoding=utf-8
" before the plugins loaded
call janus#disable_plugin('supertab')
call janus#disable_plugin('vim-trailing-whitespace')
if !has("gui_macvim")
call janus#disable_plugin('YouCompleteMe')
endif
" set leader key
let mapleader = ","
" emmet
let g:user_emmet_leader_key='<d-e>'
" YouCompleteMe
let g:ycm_key_list_select_completion=['\']
let g:ycm_key_list_previous_completion=['']
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_server_python_interpreter='/Users/minjeongkim/.pyenv/versions/3.5.2/Python.framework/Versions/3.5/bin/python'
" vim-jsx
let g:jsx_ext_required = 0
" typescript
if !exists("g:ycm_semantic_triggers")
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers['typescript'] = ['.']
" vimshell
let g:vimshell_editor_command = '/usr/local/bin/gvim'
" syntastic
let g:syntastic_javascript_checkers = ['eslint']
" easymotion N-search
map // <Plug>(easymotion-sn)
omap // <Plug>(easymotion-tn)
" These `n` & `N` mappings are options. You do not have to map `n` & `N` to EasyMotion.
" Without these mappings, `n` & `N` works fine. (These mappings just provide
" different highlight method and have some other features )
"map n <Plug>(easymotion-next)
"map N <Plug>(easymotion-prev)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment