Skip to content

Instantly share code, notes, and snippets.

@anatooly
Last active May 15, 2018 12:32
Show Gist options
  • Save anatooly/2942c729bc0037117914 to your computer and use it in GitHub Desktop.
Save anatooly/2942c729bc0037117914 to your computer and use it in GitHub Desktop.
vimrc
" https://github.com/romainl/ctags-patterns-for-javascript
set number
set nowrap
set showbreak=+++
set textwidth=100
set showmatch
set visualbell
set hlsearch
set smartcase
set ignorecase
set incsearch
set autoindent
" set smartindent
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set cursorline
set ruler
set paste
" set nopaste
set undolevels=1000
set backspace=indent,eol,start
" Map ctrl-movement keys to window switching
map <C-k> <C-w><Up>
map <C-j> <C-w><Down>
map <C-l> <C-w><Right>
map <C-h> <C-w><Left>
" Switch to alternate file
map <C-Tab> :bnext<cr>
map <C-S-Tab> :bprevious<cr>
" Clear prev search result
map <Space> :noh<cr>
" Autosave
au FocusLost * :wa
" Mouse cursor position
"set mouse=a
"set mousemodel=extend
" Moving lines
nnoremap <A-j> :m .+1<CR>==
nnoremap <A-k> :m .-2<CR>==
inoremap <A-j> <Esc>:m .+1<CR>==gi
inoremap <A-k> <Esc>:m .-2<CR>==gi
vnoremap <A-j> :m '>+1<CR>gv=gv
vnoremap <A-k> :m '<-2<CR>gv=gv
" Remove all end line spaces
autocmd BufWritePre * :%s/\s\+$//e
call plug#begin()
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'digitaltoad/vim-jade'
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'tpope/vim-fugitive'
Plug 'mileszs/ack.vim'
call plug#end()
"colo basic-dark
syntax on
color dracula
" colorscheme desert
imap <c-x><c-l> <plug>(fzf-complete-line)
set laststatus=2
set t_Co=256
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 25
let &colorcolumn=join(range(121,999),",")
let &colorcolumn="120,".join(range(400,999),",")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment