zion/vim.nix

34 lines
772 B
Nix

# Vim configuration
programs.vim.defaultEditor = true;
with import <nixpkgs> {};
vim_configurable.customize {
name = "vim";
vimrcConfig.customRC = ''
""Basic stuff
set number
set ttyfast
""Colors
colorscheme synthwave
set t_Co=256
""Misc
set clipboard=unnamedplus
set nofoldenable
""Spaces instead of tabs
set expandtab
set tabstop=2
set shiftwidth=2
""Don't litter swp files everywhere
set backupdir=~/.cache
set directory=~/.cache
""Keybindings
set pastetoggle=<F2>
let mapleader="\<Space>"
nnoremap <leader>n :noh<cr>
"Move the current line up or down
nnoremap <leader>k :m-2<cr>==
nnoremap <leader>j :m+<cr>==
'';
}