Skip to content

Instantly share code, notes, and snippets.

@hG3n
Last active December 22, 2023 16:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hG3n/1eaa1824a12b755f9d48a56675d813d5 to your computer and use it in GitHub Desktop.
Save hG3n/1eaa1824a12b755f9d48a56675d813d5 to your computer and use it in GitHub Desktop.
.ideavimrc
"""""""""""""""""""""""""""
"--- GENERAL SETTINGS ---"
"""""""""""""""""""""""""""
scriptencoding utf-8
set enc=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf8,prc
set tabstop=4
set shiftwidth=4
set softtabstop=4 "set Tabvalue=4"dd
set ruler "always show actual position"
set nu "side indexnunbers"
set history=1000
set undolevels=1000
set noswapfile "disable creating stupid .swp files"
set nobackup
set nowritebackup
set autoindent
set title "sets filename on top of the open window"
set wildmenu "sets the autocomplete in commandline"
set showmode "shows the actual mode"
set mouse=a "enables Mouse in vim"
set clipboard=unnamed "use the system clipboard for copying and pasting
set showcmd "show partial commands in status line and
"selected characters/lines in visual mode"
set showmatch "show matching brackets/parenthesis
set incsearch "find as you type search"
set hlsearch "highlights searched objects"
set expandtab "set tabs to spaces
set list listchars=tab:-\ \,trail:· "set points after
let mapleader = ";" "creates mapleader do do more key combinations
let g:mapleader = ";"
"clearing highlighted search
nmap <silent> <leader>/ :nohlsearch<CR>
"enables codefolding"
set foldmethod=indent
set foldnestmax=10
set foldcolumn=2
set nofoldenable
set foldlevel=1
"soft wrap and indent lines
set breakindent
set showbreak=\
" scroll down with five lines visible
set scrolloff=5
"show the numbers od lines
set relativenumber
"enables syntax detection"
syntax on
"colorscheme"
set t_Co=256
"set to autoread if a file is changed from the outside
set autoread
"disable the fucking sounds
set visualbell
set noerrorbells
""""""""""""""""""""
"--- REMAPPINGS ---"
""""""""""""""""""""
" options for key remapping
" <Esc> Escape key
" <C-G> CTRL-G
" <Up> cursor up key
" <C-LeftMouse> Control- left mouse click
" <S-F11> Shifted function key 11
" <M-a> Meta- a ('a' with bit 8 set)
" <M-A> Meta- A ('A' with bit 8 set)
" <t_kd> "kd" termcap entry (cursor down key)
" switch to insert mode when typing 'jk' in insert mode
" best map EVER
inoremap jk <esc>
"temporarily disable escape and cursor keys key
inoremap <esc> <nop>
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
" movement
nmap H 0
vmap H 0
nmap L $
vmap L $
"Stupid shift key fixes & helper"
cmap X x
cmap W w
cmap Q q
cmap WQ wq
cmap wQ wq
cmap Tabe tabe
cmap qq q!
cmap xx x!
cmap ww w!
"faster mapping to get into normal mode
vmap ; :norm
"Yank from the cursor to the end of the line, to be consistent with C and D"
nnoremap Y y$
"pane switching done easily
nmap <tab> <C-w><C-w>
"center current search result
nmap n nzz
nmap N Nzz
"enable surround plugin
set surround
""""""""""""""""""""""""""
"--- LEADER SHORTCUTS ---"
""""""""""""""""""""""""""
let mapleader = "," "creates mapleader do do more key combinations
nnoremap <leader>a ggVG
nnoremap <leader><space> :noh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment