Skip to content

Instantly share code, notes, and snippets.

@rmdashrfv
Last active May 18, 2021 08:42
Show Gist options
  • Select an option

  • Save rmdashrfv/a6b27de3a7e50c1b65630d32e57e46b9 to your computer and use it in GitHub Desktop.

Select an option

Save rmdashrfv/a6b27de3a7e50c1b65630d32e57e46b9 to your computer and use it in GitHub Desktop.
My .vimrc
set nocompatible " be iMproved, required
filetype off " required
set tabstop=2
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
"Plugin 'sjl/badwolf'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'tpope/vim-surround'
Plugin 'drewtempelmeyer/palenight.vim'
Plugin 'mhartington/oceanic-next'
Plugin 'scrooloose/nerdtree'
Plugin 'junegunn/fzf'
Plugin 'airblade/vim-gitgutter'
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'hail2u/vim-css3-syntax'
Plugin 'ap/vim-css-color'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
Plugin 'itchyny/lightline.vim'
Plugin 'morhetz/gruvbox'
Plugin 'valloric/youcompleteme'
Plugin 'valloric/matchtagalways'
Plugin 'maxmellon/vim-jsx-pretty'
Plugin 'mattn/emmet-vim'
Plugin 'pangloss/vim-javascript'
Plugin 'jiangmiao/auto-pairs'
Plugin 'luochen1990/rainbow'
Plugin 'kaicataldo/material.vim'
Plugin 'MattesGroeger/vim-bookmarks'
Plugin 'APZelos/blamer.nvim'
call vundle#end() " required
filetype plugin indent on " required
syntax on
"set background=dark
set t_Co=256
"colorscheme OceanicNext
colorscheme material
let g:material_theme_style = 'lighter'
let g:material_terminal_italics = 1
set shiftwidth=2
set tabstop=2
set expandtab
"colorscheme badwolf
highlight Normal ctermbg=NONE
highlight nonText ctermbg=NONE
highlight LineNr ctermbg=NONE
highlight LineNr ctermfg=gray
highlight CursorLine ctermbg=NONE
highlight CursorLineNr ctermbg=darkgreen
highlight CursorLineNr ctermfg=lightgreen
set number
set cursorline
set laststatus=2
map <C-Bslash> :NERDTreeToggle<CR>
map <C-t> :FZF<CR>
let g:lightline = {
\ 'active': {
\ 'left': [['mode', 'paste' ], ['readonly', 'filename', 'modified']],
\ 'right': [['lineinfo'], ['percent'], ['fileformat', 'fileencoding']]
\ }
\ }
let g:ycm_key_list_stop_completion = [ '<C-y>', '<Enter>' ]
let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_key_list_select_completion = ['<Enter>', '<TAB>', '<Down>']
let g:ycm_key_invoke_completion = '<Enter>'
let g:ycm_min_num_of_chars_for_completion = 1
let g:user_emmet_leader_key=','
let g:vim_jsx_pretty_highlight_close_tag = 1
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle
highlight BookmarkSign ctermbg=NONE ctermfg=160
highlight BookmarkLine ctermbg=194 ctermfg=NONE
let g:bookmark_sign = '=>'
let g:bookmark_highlight_lines = 0 " set to 1 if you want the bookmarked lines to highlight
"let g:bookmark_center = 1
let g:bookmark_save_per_working_dir = 1
let g:bookmark_auto_save = 1
let g:blamer_enabled = 1
let g:blamer_relative_time = 1
let g:blamer_delay = 500
" fixing indentation issues on Linux
set cindent cinkeys-=0#
@rmdashrfv
Copy link
Author

One thing I missed about more popular text editors was the easy move line/block up or down. These mappings replicate that feature. Source: https://vim.fandom.com/wiki/Moving_lines_up_or_down#:~:text=In%20normal%20mode%20or%20in,to%20move%20the%20block%20up.

Add this near the bottom of your .vimrc

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

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