neovim.nix (1111B)
1 { pkgs, ... }: { 2 programs.neovim = { 3 enable = true; 4 defaultEditor = true; 5 plugins = with pkgs.vimPlugins; [ 6 vim-nix 7 ]; 8 extraConfig = '' 9 set smartcase 10 set nocompatible 11 let mapleader ="," 12 set backspace=indent,eol,start 13 set clipboard+=unnamedplus 14 set ignorecase 15 set linebreak 16 set mouse=a 17 set nohlsearch 18 set number 19 set title 20 set titlestring=%f\ %m 21 set whichwrap+=<,>,h,l,[,] 22 set list listchars=nbsp:¬,tab:»·,trail:·,extends:> 23 set shiftwidth=2 24 set softtabstop=2 25 set tabstop=2 26 syntax on 27 map <C-H> <C-W> 28 map <C-Del> X<Esc>ce<del> 29 map <F8> :setlocal spell! spelllang=en_gb<CR> 30 xnoremap <A-z> :s/^.<CR>gv " alt-z removes first character of line 31 nnoremap <A-z> 0x " alt-z in normal mode removes first char 32 :iab <expr> _date strftime("%F") 33 :iab <expr> _time strftime("%H:%M") 34 :iab <expr> _stamp strftime("%F\T%H:%M:00") 35 autocmd BufWritePre * %s/\s\+$//e 36 autocmd BufWritepre * %s/\n\+\%$//e 37 lua << EOF 38 ''; 39 }; 40 }