Skip to content

Instantly share code, notes, and snippets.

@mateusdotcc
Last active April 1, 2024 20:55
Show Gist options
  • Save mateusdotcc/f0ee2b5085b7a7ff6be83a902eec3302 to your computer and use it in GitHub Desktop.
Save mateusdotcc/f0ee2b5085b7a7ff6be83a902eec3302 to your computer and use it in GitHub Desktop.
My ideavim config
" cmd:actionlist || https://gist.github.com/zchee/9c78f91cc5ad771c1f5d
let mapleader=" "
""" Common settings
set ideajoin
set scrolloff=10
set ideastatusicon=gray
set hlsearch " highlight the search
set incsearch " search as the word is typed
set ignorecase " ignore case while searching
set smartcase " smartcase while searching
set number
set relativenumber
""" Plugins --------------------------------
set NERDTree " https://github.com/JetBrains/ideavim/wiki/NERDTree-support
let g:NERDTreeMapActivateNode='l'
let g:NERDTreeMapJumpParent='h'
Plug 'tpope/vim-surround'
Plug 'machakann/vim-highlightedyank'
Plug 'terryma/vim-multiple-cursors'
map mc <A-n>
map mx <A-x>
map mp <A-p>
Plug 'easymotion/vim-easymotion'
map <Leader>j <Plug>(easymotion-s)
map <Leader>J <Plug>(easymotion-f)
Plug 'justinmk/vim-sneak'
""" set which-key
""" set notimeout
""" Mappings --------------------------------
nmap <Leader>d :action Debug<CR>
nmap <Leader>c :action Stop<CR>
nmap <Leader>s :action SelectInProjectView<CR>
nmap <Leader>a :action Annotate<CR>
nmap <Leader>r :action RenameElement<CR>
nmap <Leader>i :action QuickJavaDoc<CR>
nmap <Leader>h :action Vcs.ShowTabbedFileHistory<CR>
nmap <L-Space> :action GotoNextError<CR>
nmap <Leader>o :action FileStructurePopup<CR>
nmap <Leader>l :action EditorToggleShowLineNumbers<CR>
nmap <Leader>\ :action FindInPath<CR>
nmap <Leader>f :action GotoFile<CR>
nmap <Leader>ff :action FindInPath<CR>
nmap <Leader>z :action ToggleDistractionFreeMode<CR>
nmap <Leader>x :action HideActiveWindow<CR>
nmap <Leader>e :action EditSourceInNewWindow<CR>
nmap <Leader>n :action NextWindow<CR>
nmap <Leader>t :action ActivateTerminalToolWindow<CR>
nmap <Leader>ti :action ActivateTimeTrackingToolWindow<CR>
nmap <Leader>rt :action Refactorings.QuickListPopupAction<CR>
nmap <Leader>, :action ProjectView.ShowExcludedFiles<CR>
nmap ;q :action CloseContent<CR>
nmap ;a :action CloseAllEditors<CR>
nmap // :noh<enter>
nmap <C-j> :m +1<CR>
inoremap <C-j> <Esc>:m +1<CR>gi
inoremap <C-k> :m -2<CR>
inoremap <C-k> <Esc>:m -2<CR>gi
""" Git
nmap <Leader>b :action Git.Branches<CR>
nmap <Leader>pr :action Github.Create.Pull.Request<CR>
nmap <Leader>PR :action ActivatePullRequestsToolWindow<CR>
nmap <Leader>ro :action ChangesView.Revert<CR>
""" Navigation
nmap <c-\> :action SplitVertically<CR>
nmap <c--> :action SplitHorizontally<CR>
""" Moving between panels
sethandler <c-j> a:vim
sethandler <c-k> a:vim
nmap <c-h> <c-w>h
nmap <c-l> <c-w>l
nmap <c-j> <c-w>j
nmap <c-k> <c-w>k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment