aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2025-08-24 21:35:32 +0200
committerNicholas Rodrigues Lordello <[email protected]>2025-08-24 21:35:32 +0200
commit85151064513f4dcb1674e637d45e01da147057a7 (patch)
treeda1fb9bbb9e85a9e9357f6383ddd0cf6cce84b7e
parent537dfbeb8dacb158deadb53deffe54512d972932 (diff)
Improve Vim Configuration
We no longer hardcode a Homebrew path (yuck) and instead rely on the `packpath` feature from `vim`. Additionally added a few more tweaks and made it more XDG friendly.
-rw-r--r--config/vim/pack/local/start/.gitignore2
-rw-r--r--config/vim/vimrc7
-rwxr-xr-xinstall.sh1
3 files changed, 9 insertions, 1 deletions
diff --git a/config/vim/pack/local/start/.gitignore b/config/vim/pack/local/start/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/config/vim/pack/local/start/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/config/vim/vimrc b/config/vim/vimrc
index 9fd7710..ad5f85c 100644
--- a/config/vim/vimrc
+++ b/config/vim/vimrc
@@ -1,5 +1,8 @@
-set rtp+=/opt/homebrew/opt/fzf
+set nocompatible
+set swapfile directory=~/.cache/vim/swap | call mkdir(&directory, "p", 0700)
+set undofile undodir=~/.cache/vim/undo | call mkdir(&undodir, "p", 0700)
+set viminfofile=~/.cache/vim/viminfo
set number linebreak
set backspace=indent,eol,start
set hlsearch incsearch
@@ -9,7 +12,9 @@ set smarttab smartindent autoindent
set ruler
set mouse=a
set ttimeout ttimeoutlen=50
+set list listchars=tab:»\ ,trail:·
let [&t_SH,&t_SR,&t_SI,&t_EI] .= ["\e[2 q","\e[4 q","\e[6 q","\e[2 q"]
+let g:netrw_home = "~/.cache/vim"
noremap <space> <nop>
let mapleader = " "
diff --git a/install.sh b/install.sh
index 91cb3d0..546f362 100755
--- a/install.sh
+++ b/install.sh
@@ -33,6 +33,7 @@ mkdir -p "$HOME/.config"
dotlink "config/emacs"
dotlink "config/nvim"
+dotlink "config/vim"
gitinst \
"wbthomason/packer.nvim" \
".local/share/nvim/site/pack/packer/start/packer.nvim"