From f22f1723c01b56da14ae1de3491a78af1bc4c464 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 11 Dec 2024 20:46:32 +0100 Subject: Dot files with `chezmoi` --- dot_vimrc | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 dot_vimrc (limited to 'dot_vimrc') diff --git a/dot_vimrc b/dot_vimrc new file mode 100644 index 0000000..0be5812 --- /dev/null +++ b/dot_vimrc @@ -0,0 +1,100 @@ +autocmd! bufwritepost .vimrc source % + +set completeopt=menu,menuone,noselect + +set clipboard=unnamed + +" copy with `y` to clipboard +ca ce set clipboard+=unnamedplus +ca cd set clipboard-=unnamedplus + +set mouse=a " click with mouse +set wildmenu +set wildmode=full +set wildignore=*~,*.png,*.jpg,*.gif,Thumbs.db,*.min.js,*.swp,*.o,vendor,*.pyc + +set number " number of the current line +"set relativenumber " relative number, ..-2 -1 x 1 2, where x is current line +set textwidth=80 +set colorcolumn=80 +set nowrap +set fo-=t + +set tabstop=4 +set shiftwidth=4 +set expandtab " convert tabs in spaces + +set ai " auto indent +set autoread + +set encoding=UTF-8 +set history=1000 + +set hlsearch " highlight search +set incsearch + +set nowritebackup +set laststatus=2 + +"set list " spaces as characters +"set listchars=eol:⏎,tab:»·,trail:ˑ,nbsp:⎵ + +set foldmethod=indent + +set splitright " split on right side +set splitbelow +set lazyredraw +set ttyfast + +set noswapfile + +set termguicolors +set background=dark + +" Figure out the system Python for Neovim. +if exists("$VIRTUAL_ENV") + let g:python3_host_prog=substitute(system("which -a python3 | head -n2 | tail -n1"), "\n", '', 'g') +else + let g:python3_host_prog=substitute(system("which python3"), "\n", '', 'g') +endif + +filetype plugin indent on +set nocompatible + +set showcmd " show commands at bottom + +" nvim-tree +nnoremap :NvimTreeToggle + +" ------------ +" MAPS +" ----------- +nnoremap j gj +nnoremap k gk + +nnoremap tn :tabnew + +" buffers +nnoremap ]b :bnext +nnoremap [b :bprev + +" tabs +nnoremap ]t :tabn +nnoremap [t :tabp + +" only one window +nnoremap o :only + + +nnoremap pa :set paste +nnoremap npa :set nopaste + + +if &diff + "Get from remote + nnoremap dr :diffgetRE + "Get from base + nnoremap db :diffgetBA + "Get from local + nnoremap dl :diffgetLO +endif -- cgit v1.2.3-18-g5258