diff --git a/base/.config/ideavim/ideavimrc b/base/.config/ideavim/ideavimrc new file mode 100644 index 0000000..a5c0271 --- /dev/null +++ b/base/.config/ideavim/ideavimrc @@ -0,0 +1,161 @@ +set visualbell +set noerrorbells +set relativenumber +set number + +" Mappings +let mapleader="," +let g:mapleader="," + +map rl :source $MYVIMRC +map ss :setlocal spell! +map ts :%s/\s\s*$//g +nnoremap rc :split $MYVIMRC +nnoremap p :set paste +nnoremap np :set nopaste +nnoremap nn :set nonumber norelativenumber +nnoremap rn :set number relativenumber + +" Vim Tabs +map tt :tabnew +map te :tabedit +map tc :tabclose +map to :tabonly +map tn :tabNext +map tp :tabprevious +map tf :tabfirst +map tl :tablast +map tm :tabmove + +#execute 'source '.fnameescape(f$XDG_CONFIG_HOME.'/vim/init.d/mappings.vim') +#execute 'source '.fnameescape(f$XDG_CONFIG_HOME.'/vim/init.d/xdg.vim') + +# Include {{ }} + +if has('syntax') && !exists('g:syntax_on') + syntax enable +endif + +if has('autocmd') + filetype plugin on + filetype indent on +endif + +" Tabs +set complete-=i +set autoindent +set backspace=indent,eol,start +set smarttab +set noexpandtab +set shiftwidth=4 +set softtabstop=4 +set tabstop=4 + +set nrformats-=octal + +set incsearch +" Use to clear the highlighting of :set hlsearch. +if maparg('', 'n') ==# '' + nnoremap :nohlsearch=has('diff')?'diffupdate':'' +endif + +set laststatus=2 +set ruler +set wildmenu + +" Status +" ~/file [type] [line,column] [number of lines] +"set statusline=%F%m%r%h%w\ [%Y]\ [%03l,%03v]\ [%L] + +if !&scrolloff + set scrolloff=1 +endif +if !&sidescrolloff + set sidescrolloff=5 +endif +set display+=lastline + +if &encoding ==# 'latin1' && has('gui_running') + set encoding=utf-8 +endif + +if &listchars ==# 'eol:$' + set listchars=tab:\⇥\ ,trail:…,extends:→,precedes:←,nbsp:+ +endif + +if v:version > 703 || v:version == 703 && has("patch541") + set formatoptions+=j " Delete comment character when joining commented lines +endif + +if has('path_extra') + setglobal tags-=./tags tags-=./tags; tags^=./tags; +endif + +set autoread + +if &history < 10000 + set history=10000 +endif +if &tabpagemax < 50 + set tabpagemax=50 +endif +if !empty(&viminfo) + set viminfo^=! +endif +set sessionoptions-=options +set viewoptions-=options + +if empty(mapcheck('', 'i')) + inoremap u +endif + +if empty(mapcheck('', 'i')) + inoremap u +endif + +" Basics +set encoding=utf-8 + +" General +" setlocal spell spelllang=en_us +set fileformats=unix,dos,mac +set nostartofline +set autochdir +set colorcolumn=81 + +" Have tab complete work more like bash +set wildmode=list:longest +set whichwrap+=<,>,[,] +set magic + +" Turn on omni completion. Must have `filetype plugin on` to use. +" To use, in insert mode press ctrl+x ctrl+o +set omnifunc=syntaxcomplete#Complete +set completeopt=menu,longest,preview + +" Indent +set smartindent +set copyindent +set preserveindent +set shiftround + +" Text Formatting/Layout +set nowrap +set ignorecase +set smartcase +set list + +" UI +set showcmd +set number relativenumber +set numberwidth=4 +set hidden + +" Cues +set showmatch +set matchtime=2 +set hlsearch +set noerrorbells +set novisualbell +set t_vb= +set timeoutlen=500