Skip to content

Instantly share code, notes, and snippets.

@maio
Created March 27, 2020 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maio/8438a55f743d4e618e8cb32a843a77e3 to your computer and use it in GitHub Desktop.
Save maio/8438a55f743d4e618e8cb32a843a77e3 to your computer and use it in GitHub Desktop.
My init.vim
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-commentary'
Plug 'easymotion/vim-easymotion'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'bling/vim-airline'
Plug 'udalov/kotlin-vim'
Plug 'dracula/vim'
call plug#end()
" CtrlP
let g:ctrlp_working_path_mode = 'rac'
" EasyMotion
let g:EasyMotion_smartcase = 1
map <Leader> <Plug>(easymotion-prefix)
nmap s <Plug>(easymotion-s)
vmap s <Plug>(easymotion-s)
" FZF
let g:fzf_preview_window = ''
let g:fzf_buffers_jump = 1
set termguicolors
color dracula
imap jk <Esc>
set clipboard=unnamedplus
set ignorecase
set smartcase
let mapleader = " "
" General
"
nnoremap <leader>qq :q<CR>
nnoremap <leader>qa :qa<CR>
nnoremap <leader>fs :w<CR>
nnoremap <leader><leader> :GFiles<CR>
nnoremap <leader>bb :Buffers<CR>
nnoremap <leader>ss :BLines<CR>
nnoremap <leader>sp :Rg<CR>
" Windows
"
nnoremap <leader><Tab> <C-w>w
nnoremap <leader>wo :only<CR>
nnoremap <leader>wk <C-w>k
nnoremap <leader>wj <C-w>j
nnoremap <leader>wh <C-w>h
nnoremap <leader>wl <C-w>l
" Git
"
nnoremap <leader>gg :G<CR>:only<CR>
nnoremap <leader>pp :e ~/Projects/
nnoremap <leader>fp :e .config/nvim/init.vim<CR>
" Editor
"
vnoremap io iw
omap io :normal Vio<CR>
vnoremap ao aw
omap ao :normal Vao<CR>
nmap <Tab> %
vmap <Tab> %
nmap  <Plug>CommentaryLine\|j
vmap  <Plug>Commentary
autocmd FileType fugitive nmap <tab> =
nnoremap <leader>gd :only<CR>:Gdiffsplit<CR>
nnoremap <leader>gl :only<CR>:Gclog<CR>
nnoremap <leader>gfl :only<CR>:Gclog %<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment