dotfiles/.ideavimrc

73 lines
1.5 KiB
Text
Raw Normal View History

2024-04-20 17:17:42 +01:00
set scrolloff=8
set linenumber
set relativenumber
set showmode
set showcmd
set visualbell
set ignorecase
set smartcase
set incsearch
set hlsearch
2024-04-21 16:35:48 +01:00
set surrouncontactd
2024-04-20 17:17:42 +01:00
set commentary
set highlightedyank
let mapleader = " "
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv
nnoremap J mzJ`z
nnoremap <C-d> <C-d>zz
nnoremap <C-u> <C-u>zz
nnoremap n nzzzv
nnoremap N Nzzzv
xnoremap <leader>p "_dP
nnoremap <leader>y "+y
vnoremap <leader>y "+y
nnoremap <leader>Y "+Y
nnoremap <leader>d "_d
vnoremap <leader>d "_d
nnoremap Q <nop>
nmap <leader>zz <Action>(ToggleZenMode)
nnoremap ]q :cnext<CR>zz
nnoremap [q :cprev<CR>zz
nnoremap ]l :lnext<CR>zz
nnoremap [l :lprev<CR>zz
2024-04-21 16:35:48 +01:00
map <leader>pf <Action>(GotoFile)
map <leader>pg <Action>(FindInPath)
2024-04-20 17:17:42 +01:00
2024-04-21 16:35:48 +01:00
" erros
nmap <leader>vd <Action>(ShowErrorDescription)
2024-04-20 17:17:42 +01:00
nmap ]d <Action>(GotoNextError)
nmap [d <Action>(GotoPreviousError)
2024-04-21 16:35:48 +01:00
" lsp actions
2024-04-20 17:17:42 +01:00
nmap <leader>rn <Action>(RenameElement)
nmap <leader>gd <Action>(GotoDeclaration)
nmap <leader>gD <Action>(GotoTypeDeclaration)
nmap <leader>gi <Action>(GotoImplementation)
nmap <leader>gu <Action>(ShowUsages)
nmap <leader>gt <Action>(GotoTest)
nmap <leader>gf <Action>(Back)
nmap <leader>gb <Action>(Forward)
nmap <leader>fo <Action>(ReformatCode)
2024-04-21 16:35:48 +01:00
vmap <leader>fo <Action>(ReformatCode)
2024-04-20 17:17:42 +01:00
imap <C-y> <Action>(EditorChooseLookupItem)
2024-04-21 16:35:48 +01:00
imap <C-l> <Action>(NextTemplateVariable)
smap <C-l> <Action>(NextTemplateVariable)
imap <C-h> <Action>(PreviousTemplateVariable)
smap <C-h> <Action>(PreviousTemplateVariable)