From 2c6193a487576af25552a0574a2bb3cc74f16635 Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Sun, 25 Apr 2021 21:20:14 +0300 Subject: [PATCH] [nvim] collapse the set and setlocal commands because the Vimscript syntax allows it --- nvim/after/ftplugin/haskell.vim | 4 +--- nvim/after/syntax/cabal.vim | 3 +-- nvim/after/syntax/cabalconfig.vim | 3 +-- nvim/after/syntax/nginx.vim | 3 +-- nvim/plugin/editing.vim | 10 ++-------- 5 files changed, 6 insertions(+), 17 deletions(-) diff --git a/nvim/after/ftplugin/haskell.vim b/nvim/after/ftplugin/haskell.vim index bdabaed..8d98c34 100644 --- a/nvim/after/ftplugin/haskell.vim +++ b/nvim/after/ftplugin/haskell.vim @@ -1,3 +1 @@ -let g:haskall_test = 1 -setlocal foldmethod< -setlocal foldtext< +setlocal foldmethod< foldtext< diff --git a/nvim/after/syntax/cabal.vim b/nvim/after/syntax/cabal.vim index 8ced55f..8d98c34 100644 --- a/nvim/after/syntax/cabal.vim +++ b/nvim/after/syntax/cabal.vim @@ -1,2 +1 @@ -setlocal foldmethod< -setlocal foldtext< +setlocal foldmethod< foldtext< diff --git a/nvim/after/syntax/cabalconfig.vim b/nvim/after/syntax/cabalconfig.vim index 8ced55f..8d98c34 100644 --- a/nvim/after/syntax/cabalconfig.vim +++ b/nvim/after/syntax/cabalconfig.vim @@ -1,2 +1 @@ -setlocal foldmethod< -setlocal foldtext< +setlocal foldmethod< foldtext< diff --git a/nvim/after/syntax/nginx.vim b/nvim/after/syntax/nginx.vim index 1e4e3af..bf72a83 100644 --- a/nvim/after/syntax/nginx.vim +++ b/nvim/after/syntax/nginx.vim @@ -4,5 +4,4 @@ " sourced in `syntax/nginx.vim` in vim-polyglot, which resets the `commentstring` " set in `ftplugin/nginx.vim` and sets `comments` to some garbage. This script " undoes that damage. -setlocal comments< -setlocal commentstring=#%s +setlocal comments< commentstring=#%s diff --git a/nvim/plugin/editing.vim b/nvim/plugin/editing.vim index 59b18d3..46cbe9b 100644 --- a/nvim/plugin/editing.vim +++ b/nvim/plugin/editing.vim @@ -58,23 +58,17 @@ set commentstring=//%s " Cursor and Scrolling {{{ - - set number - set relativenumber - set cursorline - + set number relativenumber cursorline " remember cursor position augroup vimrc-editing-remember-cursor-position autocmd! autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exec "normal! g`\"" | endif augroup END - " }}} " Wrapping {{{ - set nowrap - set colorcolumn=81,101,121 + set nowrap colorcolumn=81,101,121 " }}}