From 3d340c689b39427f1b29b642baa108d7f5fc39ac Mon Sep 17 00:00:00 2001 From: Polesznyák Márk Date: Sat, 29 Nov 2025 00:21:56 +0100 Subject: feat: initial commit --- .vimrc | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 .vimrc (limited to '.vimrc') diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..b56e82c --- /dev/null +++ b/.vimrc @@ -0,0 +1,149 @@ +syntax enable +filetype plugin indent on +set grepprg=grep\ -nH\ $* + +set number +set relativenumber +set scrolloff=10 +set nocursorline + +set conceallevel=2 +set laststatus=2 + +set shiftwidth=2 +set tabstop=2 +set softtabstop=2 +set expandtab + +set mouse= + +set noswapfile +set nobackup + +set magic +set showmatch +set nocompatible + +set wildmenu +set wildmode=list:longest,full +set completeopt=longest,menuone,preview +set tags=$MYVIMDIR/system.tags,tags +set omnifunc=syntaxcomplete#Complete + +set splitright +set splitbelow +set cmdheight=1 +set whichwrap+=<,>,[,] +set ignorecase +set smartcase +set hlsearch +set incsearch +set shortmess-=S +set smartindent +set autoindent + +set encoding=utf8 +try + lang en_us +catch +endtry + +set background=dark +if has('termguicolors') + set termguicolors +endif + +try + let g:disable_bg = 1 + let g:disable_float_bg = 1 + colorscheme rosepine +catch /^Vim\%((\a\+)\)\=:E185/ + colorscheme slate +endtry + +let b:branch_name = '' +function BranchName() + let branch = system("git branch --show-current 2> /dev/null | tr -d '\n'") + if branch != '' + let b:branch_name=' ' .. branch + else + let b:branch_name='' + endif + return b:branch_name +endfunction + +let g:word_count=wordcount().words +function WordCount() + if has_key(wordcount(),'visual_words') + let g:word_count=wordcount().visual_words."/".wordcount().words + else + let g:word_count=wordcount().cursor_words."/".wordcount().words + endif + return g:word_count +endfunction + +set statusline= +set statusline=\ %<\ %f\ %{BranchName()}\ %m\ %=\ [%{&filetype}]\ %l:%c\ + +if has('unnamedplus') + set clipboard=unnamedplus +else + set clipboard=unnamed +endif + +let mapleader = ' ' +let g:mapleader = ' ' + +map v :vert term +map - :term +map j +map k +map h +map l +tnoremap +tmap j +tmap k +tmap h +tmap l + +map n nzz +map N Nzz + +nnoremap :nohl +nnoremap e :Ex +nnoremap F =ap +nnoremap rc :e $MYVIMRC +nnoremap :!chmod 755 % + +inoremap +nnoremap gd +nnoremap x :bw +nnoremap n :bn +nnoremap p :bp + +nnoremap J :m .+1== +nnoremap K :m .-2== +vnoremap J :m '>+1gv=gv +vnoremap K :m '<-2gv=gv + +nnoremap a +nnoremap x +vnoremap > >gv +vnoremap < ]s + nnoremap [s + } + au FileType cs { + setlocal makeprg=dotnet\ run + setlocal errorformat=\ %#%f(%l\\\,%c):\ error\ CS%n:\ %m + } +augroup END -- cgit v1.2.3