simpler times

This commit is contained in:
Ellen Arvidsson 2022-03-14 10:53:03 +01:00
parent 959908970c
commit db2dd04dce
2 changed files with 43 additions and 11 deletions

53
.vimrc
View file

@ -13,34 +13,34 @@ Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs' Plug 'jistr/vim-nerdtree-tabs'
" Snippet handler " Snippet handler
Plug 'SirVer/ultisnips' " Plug 'SirVer/ultisnips'
" snippets for ultisnips " snippets for ultisnips
Plug 'honza/vim-snippets' " Plug 'honza/vim-snippets'
" supertab for completion " supertab for completion
Plug 'ervandew/supertab' " Plug 'ervandew/supertab'
" YouCompleteMe auto-completion " YouCompleteMe auto-completion
Plug 'Valloric/YouCompleteMe' " Plug 'Valloric/YouCompleteMe'
" More clever matching for % key " More clever matching for % key
Plug 'tmhedberg/matchit' Plug 'tmhedberg/matchit'
" JavaScript syntax highlighting " JavaScript syntax highlighting
Plug 'pangloss/vim-javascript' " Plug 'pangloss/vim-javascript'
" jsx syntax highlighting " jsx syntax highlighting
Plug 'mxw/vim-jsx' " Plug 'mxw/vim-jsx'
" Language server protocol linter " Language server protocol linter
Plug 'w0rp/ale' " Plug 'w0rp/ale'
" fugitive.vim git integration " fugitive.vim git integration
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
" Clojure highlight " Clojure highlight
Plug 'guns/vim-clojure-static' " Plug 'guns/vim-clojure-static'
" Surround " Surround
Plug 'tpope/vim-surround' Plug 'tpope/vim-surround'
@ -51,6 +51,9 @@ Plug 'tpope/vim-repeat'
" Ack.vim -- can use ag with this " Ack.vim -- can use ag with this
Plug 'mileszs/ack.vim' Plug 'mileszs/ack.vim'
" Haskell syntax
Plug 'neovimhaskell/haskell-vim'
call plug#end() call plug#end()
" All of your Plugins must be added before the following line " All of your Plugins must be added before the following line
@ -80,6 +83,12 @@ set undolevels=1000
" highlight search results " highlight search results
set hlsearch set hlsearch
" show tabs and spaces
set list
set listchars=tab:··>,trail
hi SpecialKey ctermfg=DarkGrey
" make delimitMate insert another line when " make delimitMate insert another line when
" closing curlys for example " closing curlys for example
let delimitMate_expand_cr = 1 let delimitMate_expand_cr = 1
@ -161,6 +170,12 @@ augroup json_macros " {
autocmd FileType json :nnoremap <localleader>fm :%!python -m json.tool<CR> autocmd FileType json :nnoremap <localleader>fm :%!python -m json.tool<CR>
augroup END " } augroup END " }
" Haskell
augroup hs_stuff " {
autocmd!
autocmd BufNewFile,BufRead *.hsc set filetype=haskell
augroup END " }
" Function for toggling the relative line numbers " Function for toggling the relative line numbers
function ToggleRelative() function ToggleRelative()
if &relativenumber==1 if &relativenumber==1
@ -185,9 +200,23 @@ endfunction
noremap <leader>g :call GrepAskForDir(expand("<cword>"))<CR> noremap <leader>g :call GrepAskForDir(expand("<cword>"))<CR>
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 <leader>i :call SetIdentWidth()<CR>
" Automatically user relative lines when not in insert mode " Automatically user relative lines when not in insert mode
au InsertLeave * :set relativenumber " au InsertLeave * :set relativenumber
au InsertEnter * :set norelativenumber " au InsertEnter * :set norelativenumber
" Syntastic settings " Syntastic settings
@ -216,3 +245,7 @@ noremap <leader>h :nohlsearch<CR>
if executable('ag') if executable('ag')
let g:ackprg = 'ag --vimgrep' let g:ackprg = 'ag --vimgrep'
endif endif
digraphs \- 8866
digraphs -\ 8867

View file

@ -1 +0,0 @@
set softtabstop=4 shiftwidth=4 expandtab