Skip to content

Instantly share code, notes, and snippets.

@namcoder namcoder/init.vim
Created Aug 26, 2019

Embed
What would you like to do?
call plug#begin('~/.vim/plugged')
Plug 'junegunn/vim-easy-align'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'w0rp/ale'
Plug 'itchyny/lightline.vim'
Plug 'tpope/vim-surround'
Plug 'morhetz/gruvbox'
Plug 'pangloss/vim-javascript'
Plug 'scrooloose/nerdcommenter'
Plug 'chemzqm/vim-jsx-improve'
Plug 'jiangmiao/auto-pairs'
Plug 'godlygeek/tabular'
call plug#end()
" for tabular
nmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a: :Tabularize /:\zs<CR>
vmap <Leader>a: :Tabularize /:\zs<CR>
colorscheme gruvbox
syntax enable
set nowrap
set ignorecase
set backupcopy=yes
set background=dark
set showcmd
set backspace=indent,eol,start
set autochdir
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set linebreak
set pastetoggle=<F9>
set clipboard+=unnamed " use the clipboards of vim and win
set paste " Paste from a windows or from vim
set go+=a " Visual selection automatically copied to the clipboard
set mouse=a
set number
set hlsearch
set autoindent
"filetype indent on
set showmatch
"au BufRead * normal zR
nmap <Leader><Space> :nohl<cr>
let NERDTreeShowHidden=1
autocmd VimEnter * NERDTree
let g:ale_fixers = {
\ 'javascript': ['eslint']
\ }
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'absolutepath', 'modified' ] ]
\ }
\ }
let g:ale_sign_error = ''
let g:ale_sign_warning = '⚠️'
let g:ale_fix_on_save = 1
let NERDTreeIgnore=['\.DS_Store$','\.git$']
set foldmethod=indent
set foldlevel=99
let javaScript_fold=1
"" Move visual block
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv
" keep select highlight when move block of selection "
vnoremap < <gv
vnoremap > >gv
"center the screen when press n for next selection"
"nnoremap n z.
"nnoremap N z.
"inoremap \" \""<left>
"inoremap ' ''<left>
"inoremap ( ()<left>
"inoremap [ []<left>
"inoremap { {}<left>
"inoremap {<CR> {<CR>}<ESC>O
"Disable arrows
"noremap <Up> <NOP>
"noremap <Down> <NOP>
"noremap <Left> <NOP>
"noremap <Right> <NOP>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.