Skip to content

Instantly share code, notes, and snippets.

@FrancescoLuzzi
Created June 12, 2026 09:01
Show Gist options
  • Select an option

  • Save FrancescoLuzzi/20ecd10d016198418b0578d1d0bb79c8 to your computer and use it in GitHub Desktop.

Select an option

Save FrancescoLuzzi/20ecd10d016198418b0578d1d0bb79c8 to your computer and use it in GitHub Desktop.
VsVim configuration
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
" the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc
set clipboard=unnamed
set number " show line numbers
set relativenumber " show relative line numbers
set incsearch " incremental research
set scrolloff=8 " start scrolling before end on visual
set nowrap " long lines stay on the same line
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set shiftwidth=4 " number of spaces when shifting
set expandtab " tabs are spaces
set autoindent " auto indent code
set ignorecase " ignore casing while searching string
set smartcase " if an upper letter is searched don't ignore casing
set backspace=indent,eol,start " more powerful backspacing
set cursorline
let mapleader = " "
" remap to move within windows without pressing ctrl+w
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" remap to move between buffers Shift + l/h
nnoremap <S-L> :vsc Window.NextTab<CR>
nnoremap <S-H> :vsc Window.PreviousTab<CR>
nnoremap <S-K> :vsc Edit.QuickInfo<CR>
nnoremap gD :vsc Edit.GoToImplementation<CR>
nnoremap <C-O> :vsc View.NavigateBackward<CR>
nnoremap <C-I> :vsc View.NavigateForward<CR>
nnoremap <leader>la :vsc View.QuickActions<CR>
nnoremap <leader>lr :vsc Refactor.Rename<CR>
nnoremap <leader>x :vsc Window.CloseDocumentWindow<CR>
nnoremap <leader>o :vsc File.CloseOtherTabs<CR>
nnoremap <leader>O :vsc Window.CloseAllDocuments<CR>
nnoremap <leader>/ :vsc Edit.ToggleLineComment<CR>
vnoremap <leader>/ :vsc Edit.ToggleLineComment<CR>
" move selected lines with Alt + k/j
nnoremap <M-J> vsc Edit.MoveSelectedLinesUp<CR>
nnoremap <M-K> vsc Edit.MoveSelectedLinesDown<CR>
vnoremap <M-J> vsc Edit.MoveSelectedLinesUp<CR>
vnoremap <M-K> vsc Edit.MoveSelectedLinesDown<CR>
" --- Multi-Cursor / Selection ---
" Add cursor to next occurrence of current word
nnoremap <C-N> :vsc Edit.InsertNextMatchingCaret<CR>
vnoremap <C-N> :vsc Edit.InsertNextMatchingCaret<CR>
" VISUAL MODE REMAPS
vnoremap < <gv
vnoremap > >gv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment