From db2dd04dcee1bfbf9002b4f20525431e1114a631 Mon Sep 17 00:00:00 2001 From: Ellen Arvidsson Date: Mon, 14 Mar 2022 10:53:03 +0100 Subject: [PATCH] simpler times --- .vimrc | 53 +++++++++++++++++++++++++++++++++++--------- after/ftplugin/c.vim | 1 - 2 files changed, 43 insertions(+), 11 deletions(-) delete mode 100644 after/ftplugin/c.vim diff --git a/.vimrc b/.vimrc index a075fa6..0e538f6 100644 --- a/.vimrc +++ b/.vimrc @@ -13,34 +13,34 @@ Plug 'scrooloose/nerdtree' Plug 'jistr/vim-nerdtree-tabs' " Snippet handler -Plug 'SirVer/ultisnips' +" Plug 'SirVer/ultisnips' " snippets for ultisnips -Plug 'honza/vim-snippets' +" Plug 'honza/vim-snippets' " supertab for completion -Plug 'ervandew/supertab' +" Plug 'ervandew/supertab' " YouCompleteMe auto-completion -Plug 'Valloric/YouCompleteMe' +" Plug 'Valloric/YouCompleteMe' " More clever matching for % key Plug 'tmhedberg/matchit' " JavaScript syntax highlighting -Plug 'pangloss/vim-javascript' +" Plug 'pangloss/vim-javascript' " jsx syntax highlighting -Plug 'mxw/vim-jsx' +" Plug 'mxw/vim-jsx' " Language server protocol linter -Plug 'w0rp/ale' +" Plug 'w0rp/ale' " fugitive.vim git integration Plug 'tpope/vim-fugitive' " Clojure highlight -Plug 'guns/vim-clojure-static' +" Plug 'guns/vim-clojure-static' " Surround Plug 'tpope/vim-surround' @@ -51,6 +51,9 @@ Plug 'tpope/vim-repeat' " Ack.vim -- can use ag with this Plug 'mileszs/ack.vim' +" Haskell syntax +Plug 'neovimhaskell/haskell-vim' + call plug#end() " All of your Plugins must be added before the following line @@ -80,6 +83,12 @@ set undolevels=1000 " highlight search results set hlsearch +" show tabs and spaces +set list +set listchars=tab:··>,trail:· + +hi SpecialKey ctermfg=DarkGrey + " make delimitMate insert another line when " closing curlys for example let delimitMate_expand_cr = 1 @@ -161,6 +170,12 @@ augroup json_macros " { autocmd FileType json :nnoremap fm :%!python -m json.tool augroup END " } +" Haskell +augroup hs_stuff " { + autocmd! + autocmd BufNewFile,BufRead *.hsc set filetype=haskell +augroup END " } + " Function for toggling the relative line numbers function ToggleRelative() if &relativenumber==1 @@ -185,9 +200,23 @@ endfunction noremap g :call GrepAskForDir(expand("")) +function SetIdentWidth() + call inputsave() + let l:width = input('Set ident: ') + call inputrestore() + if l:width=='' + set tabstop=8 shiftwidth=8 noexpandtab + else + let l:numw = str2nr(l:width, 10) + execute 'set softtabstop=' . l:numw . ' shiftwidth=' . l:numw . ' expandtab' + endif +endfunction + +noremap i :call SetIdentWidth() + " Automatically user relative lines when not in insert mode -au InsertLeave * :set relativenumber -au InsertEnter * :set norelativenumber +" au InsertLeave * :set relativenumber +" au InsertEnter * :set norelativenumber " Syntastic settings @@ -216,3 +245,7 @@ noremap h :nohlsearch if executable('ag') let g:ackprg = 'ag --vimgrep' endif + +digraphs \- 8866 +digraphs -\ 8867 + diff --git a/after/ftplugin/c.vim b/after/ftplugin/c.vim deleted file mode 100644 index 520e290..0000000 --- a/after/ftplugin/c.vim +++ /dev/null @@ -1 +0,0 @@ -set softtabstop=4 shiftwidth=4 expandtab