From e6ed60548397627bf10f561f9438201dbba0a36e Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 21 Apr 2024 02:15:42 +0300 Subject: 2024-04-21 --- modules/common/vim/default.nix | 47 ------------ modules/common/vim/rc.vim | 169 ----------------------------------------- 2 files changed, 216 deletions(-) delete mode 100644 modules/common/vim/default.nix delete mode 100644 modules/common/vim/rc.vim (limited to 'modules/common/vim') diff --git a/modules/common/vim/default.nix b/modules/common/vim/default.nix deleted file mode 100644 index 93729bc..0000000 --- a/modules/common/vim/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; -let - cfg = config.nixfiles.modules.vim; -in -{ - options.nixfiles.modules.vim = { - enable = mkEnableOption "Vim"; - - rc = mkOption { - type = types.str; - default = readFile ./rc.vim; - description = "Configuration file."; - }; - - plugins = mkOption { - type = with types; listOf package; - default = with pkgs.vimPlugins; [ - editorconfig-vim - vim-eunuch - vim-nix - vim-sensible - vim-sleuth - vim-surround - vim-unimpaired - ]; - description = "Plugins."; - }; - }; - - config = mkIf cfg.enable { - hm.stylix.targets.vim.enable = false; - - environment = with config.programs.vim; { - systemPackages = [ package ]; - variables = rec { - EDITOR = mkOverride 15 (getExe' package "vim"); - VISUAL = EDITOR; - }; - }; - }; -} diff --git a/modules/common/vim/rc.vim b/modules/common/vim/rc.vim deleted file mode 100644 index 3bd9eb7..0000000 --- a/modules/common/vim/rc.vim +++ /dev/null @@ -1,169 +0,0 @@ -let $VIMFILES = expand(':p:h') - -let g:skip_defaults_vim = 1 - -let g:netrw_dirhistmax = 0 - -if has('unnamedplus') - set clipboard^=unnamedplus -else - set clipboard^=unnamed -endif - -set backspace=indent,eol,start -set diffopt+=iwhite -set hidden -set lazyredraw -set mouse= -set path+=** -set viminfo= - -set cmdheight=1 -set fillchars=vert:\ " -set modeline -set noshowmode -set shortmess+=I -set textwidth=0 -set title - -set noerrorbells -set novisualbell - -set splitbelow -set splitright - -set complete= -set complete+=. -set complete+=b -set complete+=t -set completeopt= -set completeopt+=menu -set completeopt+=longest - -set gdefault -set hlsearch -set iskeyword+=- -set magic - -set foldmethod=marker -set nofoldenable - -set shortmess= -set shortmess+=I -set shortmess+=T -set shortmess+=a -set shortmess+=c -set shortmess+=t - -set nolist -set nowrap - -set scrolloff=10 -set sidescrolloff=10 - -set number -if v:version >= 700 - set numberwidth=3 -endif - -set wildignorecase -set wildignore= - -set nobackup -set noswapfile -set noundofile -set nowritebackup - -set smartcase -set ignorecase - -set autoindent -set breakindent -set smartindent - -set expandtab -set shiftround -set shiftwidth=4 -set smarttab -set softtabstop=4 -set tabstop=4 - -set colorcolumn= -let g:EditorConfig_max_line_indicator = "none" - -nnoremap -let mapleader=" " - -nnoremap :W :w -nnoremap :W! :w! -nnoremap :Q :q -nnoremap :Q! :q! - -nnoremap j v:count ? 'j' : 'gj' -nnoremap k v:count ? 'k' : 'gk' - -nnoremap J gt -nnoremap K gT - -nnoremap ^h -vnoremap ^h -nnoremap H ^h -vnoremap H ^h - -nnoremap $ -vnoremap $ -nnoremap L $ -vnoremap L $ - -nnoremap N Nzzzv -nnoremap n nzzzv - -inoremap u -inoremap u - -vnoremap < >gv -vnoremap >gv -vnoremap >>_ -nnoremap <<_ - -nnoremap ]b :bnext -nnoremap [b :bprevious - -nnoremap h -nnoremap j -nnoremap k -nnoremap l - -nnoremap * /\<=expand('')\> -nnoremap # ?\<=expand('')\> - -cnoremap ;/ =expand('%:p:h').'/' -cnoremap ;; =expand('%:t') -cnoremap ;. =expand('%:p:r') - -nnoremap . :lcd %:p:h - -nnoremap Q @q - -nnoremap c ^v$h -nnoremap v ggVG - -nnoremap y "+y -nnoremap Y "+Y - -nnoremap p "+p -nnoremap P "+P - -inoremap "+pi -cnoremap + - -nmap w :w! -nmap wq :wq! - -nnoremap ZX :qa! - -nnoremap q :q - -command WS w !sudo tee "%" >/dev/null -- cgit 1.4.1