1
0
mirror of https://github.com/chylex/dotfiles.git synced 2025-08-17 17:31:45 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
be2bdafe78 Update .vimrc (selection & clipboard) 2025-07-08 16:25:26 +02:00
cda970bfc2 Update .vimrc (GUI configuration & consistency) 2025-07-08 16:25:26 +02:00

54
.vimrc
View File

@@ -1,5 +1,8 @@
set autoindent set autoindent
set backspace=indent,eol,start
set encoding=utf-8 set encoding=utf-8
set guifont=Cascadia_Mono:h12:cANSI:qDRAFT
set guioptions-=t " Remove menu tearoff
set history=1024 set history=1024
set hlsearch set hlsearch
set ignorecase set ignorecase
@@ -14,12 +17,14 @@ set mouse=a
set noerrorbells set noerrorbells
set noshowcmd set noshowcmd
set noshowmode set noshowmode
set number
set nrformats-=octal set nrformats-=octal
set number
set relativenumber set relativenumber
set scrolloff=999 set scrolloff=999
set shiftwidth=0 set shiftwidth=0
set showbreak= set shortmess-=S " Show search count
set shortmess-=l " Show full description for lines and bytes
set showbreak=↪\
set showmatch set showmatch
set sidescrolloff=999 set sidescrolloff=999
set smartcase set smartcase
@@ -27,22 +32,35 @@ set tabstop=4
set ttimeout set ttimeout
set ttimeoutlen=50 set ttimeoutlen=50
set ttymouse=xterm2 set ttymouse=xterm2
set virtualedit=onemore
set wildmenu set wildmenu
set winaltkeys=no
set wrap set wrap
" Show full description for lines and bytes " Windows paths
set shortmess-=l set packpath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME
" Show search count
set shortmess-=S
" Color scheme " Color scheme
syntax enable syntax enable
colorscheme custom
highlight LineNr ctermfg=244 if has("gui_running")
highlight IncSearch ctermfg=251 ctermbg=238 colorscheme retrobox
highlight Search ctermfg=251 ctermbg=238 highlight NonText ctermfg=14 guifg=#7c6f64
highlight Visual ctermfg=240 ctermbg=250 else
colorscheme custom
highlight LineNr ctermfg=244
highlight IncSearch ctermfg=251 ctermbg=238
highlight Search ctermfg=251 ctermbg=238
highlight Visual ctermfg=240 ctermbg=250
endif
" Windows GUI
if has("win32") && has("gui_running")
au GUIEnter * simalt ~x " Maximize window
set renderoptions=type:directx " Fix unicode rendering
set showbreak=→\
endif
" Fix Alt mappings (https://github.com/vim/vim/issues/2588#issuecomment-697959290) " Fix Alt mappings (https://github.com/vim/vim/issues/2588#issuecomment-697959290)
for ord in range(65, 90) + range(97, 122) for ord in range(65, 90) + range(97, 122)
@@ -124,7 +142,17 @@ nnoremap D dd
xnoremap D dd xnoremap D dd
" Enter visual block mode " Enter visual block mode
map <M-v> <C-v> noremap <M-v> <C-v>
" Use Ctrl for selection and clipboard
noremap <C-a> ggVG
vnoremap <C-c> "+y
vnoremap <C-x> "+x
noremap <C-v> "+gP
inoremap <C-v> <Esc>:set paste<CR>i<C-r>+<Esc>:set nopaste<CR>i
cnoremap <C-v> <C-r>+
" Indent keeping selection " Indent keeping selection
xnoremap < <gv xnoremap < <gv