summaryrefslogtreecommitdiffstats
path: root/vim.nix
diff options
context:
space:
mode:
authorSkullheadx <admonty1@protonmail.com>2026-05-01 12:46:33 -0400
committerSkullheadx <admonty1@protonmail.com>2026-05-01 12:46:33 -0400
commit5dfea741598d1c3a926f74a712a0522ea444e06a (patch)
treee7ec61fef4cfe496a4de5aaca384ba4e4736f998 /vim.nix
parentbash and readline config (diff)
downloadnixos-5dfea741598d1c3a926f74a712a0522ea444e06a.tar.gz
nixos-5dfea741598d1c3a926f74a712a0522ea444e06a.tar.bz2
nixos-5dfea741598d1c3a926f74a712a0522ea444e06a.zip
vim configuration
Diffstat (limited to 'vim.nix')
-rw-r--r--vim.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/vim.nix b/vim.nix
new file mode 100644
index 0000000..80e1ed2
--- /dev/null
+++ b/vim.nix
@@ -0,0 +1,62 @@
+{config, pkgs, ... }:
+{
+ environment.etc."vimrc".text = ''
+set autoread
+au FocusGained,BufEnter * silent! checktime
+
+" :W sudo saves the file
+" (useful for handling the permission-denied error)
+command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
+
+" Turn on the Wild menu
+set wildmenu
+
+" Ignore compiled files
+set wildignore=*.o,*~,*.pyc
+set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
+
+
+set ruler
+
+set ignorecase
+set smartcase
+set hlsearch
+set incsearch
+set lazyredraw
+set magic
+set showmatch
+
+syntax enable
+set noswapfile
+
+" Use spaces instead of tabs
+set expandtab
+
+" Be smart when using tabs ;)
+set smarttab
+
+" 1 tab == 4 spaces
+set shiftwidth=4
+set tabstop=4
+
+" Linebreak on 500 characters
+set lbr
+set tw=500
+
+set ai "Auto indent
+set si "Smart indent
+set wrap "Wrap lines
+
+" Always show the status line
+set laststatus=2
+
+set number relativenumber
+
+
+ " Force the cursor to a Block when Vim starts
+let &t_ti .= "\e[2 q"
+let &t_te .= "\e[2 q"
+let &t_EI = "\e[2 q"
+let &t_SI = "\e[2 q"
+ '';
+}