From 9b0b4cf9f8ba09d658fac0291ca455dbe54724bb Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 22 Dec 2024 14:42:20 -0600 Subject: [PATCH] tui: remove vim (using nvim now) --- home/modules/tui/default.nix | 2 +- home/modules/tui/vim.nix | 65 ------------------------------------ 2 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 home/modules/tui/vim.nix diff --git a/home/modules/tui/default.nix b/home/modules/tui/default.nix index 06cc41c..6aebc2b 100644 --- a/home/modules/tui/default.nix +++ b/home/modules/tui/default.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { # Core CLI apps - imports = [ ./git.nix ./shell ./nix-index.nix ./neovim ./tmux.nix ./vim.nix ]; + imports = [ ./git.nix ./shell ./nix-index.nix ./neovim ./tmux.nix ]; home.packages = with pkgs; [ apg # Automatic password generator diff --git a/home/modules/tui/vim.nix b/home/modules/tui/vim.nix deleted file mode 100644 index 6cb1af5..0000000 --- a/home/modules/tui/vim.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ pkgs, ... }: { - programs.vim = { - enable = true; - # defaultEditor = true; - settings = { - background = "dark"; - expandtab = true; - number = true; - shiftwidth = 2; - tabstop = 2; - }; - plugins = with pkgs.vimPlugins; [ - nerdcommenter - vim-go - vim-sensible - vim-trailing-whitespace - ]; - extraConfig = '' - " Tmux integration to switch panes with Ctrl+{hkjl} - if exists('$TMUX') - function! TmuxOrSplitSwitch(wincmd, tmuxdir) - let previous_winnr = winnr() - silent! execute "wincmd " . a:wincmd - if previous_winnr == winnr() - call system("tmux select-pane -" . a:tmuxdir) - redraw! - endif - endfunction - - let previous_title = substitute(system("tmux display-message -p '#{pane_title}'"), '\n', "", "") - let &t_ti = "\2;vim\\\" . &t_ti - let &t_te = "\2;". previous_title . "\\\" . &t_te - - nnoremap :call TmuxOrSplitSwitch('h', 'L') - nnoremap :call TmuxOrSplitSwitch('j', 'D') - nnoremap :call TmuxOrSplitSwitch('k', 'U') - nnoremap :call TmuxOrSplitSwitch('l', 'R') - else - map h - map j - map k - map l - endif - - " coding preference - filetype off - filetype plugin indent on - - syntax on - set backspace=indent,eol,start - set noautoindent - set noswapfile - set ruler - set showmatch - set smarttab - set sts=2 - let g:NERDSpaceDelims=1 - - let mapleader="," - if has("autocmd") - autocmd FileType go set ts=2 sw=2 sts=2 noet nolist autowrite - endif - ''; - }; -}