Skip to content

Instantly share code, notes, and snippets.

@plainOldCode
Last active August 25, 2020 08:41
Show Gist options
  • Save plainOldCode/426814b49ffcc07a97c7abee51570a46 to your computer and use it in GitHub Desktop.
Save plainOldCode/426814b49ffcc07a97c7abee51570a46 to your computer and use it in GitHub Desktop.
vim.rc
set nocompatible " be iMproved, required
filetype off " required
set clipboard=unnamedplus
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/vundle'
Plugin 'vim-airline/vim-airline'
Plugin 'scrooloose/nerdtree'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
"Plugin 'crusoexia/vim-monokai'
Plugin 'junegunn/goyo.vim'
Plugin 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plugin 'junegunn/fzf.vim'
Plugin 'presenting.vim'
"lugin 'MattesGroeger/vim-bookmarks'
"Plugin 'christoomey/vim-tmux-navigator'
"Plugin 'fatih/vim-go'
"Plugin 'tomlion/vim-solidity'
Plugin 'prettier/vim-prettier',{ 'do': 'yarn install' }
Plugin 'leafgarland/typescript-vim'
Plugin 'zivyangll/git-blame.vim'
Plugin 'pechorin/any-jump.vim'
Plugin 'voldikss/vim-floaterm'
"Plugin 'vim-geeknote'
call vundle#end() " required
filetype plugin indent on
syntax enable
set smartindent
set ts=2 ai
set noswapfile
set guifont=consolas:h10
set rtp+=/.fzf
set backspace=indent,eol,start
set fillchars+=vert:\│
hi VertSplit ctermfg=Black ctermbg=DarkGray
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_symbols.space = "\ua0"
let g:airline_right_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_left_alt_sep= ''
let g:airline_left_sep = ''
let mapleader=","
nnoremap <Leader>rc :rightbelow vnew $MYVIMRC<CR>
noremap <C-h> <C-w>h
noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-w>l
nnoremap <C-F> :NERDTreeToggle<CR>
"nnoremap <C-G> :Geeknote<CR>
nnoremap <Leader>s :<C-u>call gitblame#echo()<CR>
nnoremap <Leader>fa :NERDTreeFind<CR>
"Floaterm
let g:floaterm_keymap_toggle = '<F10>'
"Prettier
let g:prettier#config#config_precedence = 'prefer-file'
let g:prettier#autoformat = 0
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
" Jump to definition under cursore
nnoremap <leader>j :AnyJump<CR>
" Show line numbers in search rusults
let g:any_jump_list_numbers = 1
" Auto search references
let g:any_jump_references_enabled = 1
" Auto group results by filename
let g:any_jump_grouping_enabled = 0
" Amount of preview lines for each search result
let g:any_jump_preview_lines_count = 5
" Max search results, other results can be opened via [a]
let g:any_jump_max_search_results = 10
" Prefered search engine: rg or ag
let g:any_jump_search_prefered_engine = 'ag'
" Disable default any-jump keybindings (default: 0)
let g:any_jump_disable_default_keybindings = 1
" Remove comments line from search results (default: 1)
let g:any_jump_remove_comments_from_results = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment