diff --git a/nvim/after/ftplugin/fugitive.vim b/nvim/after/ftplugin/fugitive.vim deleted file mode 100644 index ab49c88..0000000 --- a/nvim/after/ftplugin/fugitive.vim +++ /dev/null @@ -1 +0,0 @@ -setlocal nofoldenable foldmethod=manual diff --git a/nvim/after/ftplugin/haskell.vim b/nvim/after/ftplugin/haskell.vim index 8d98c34..bdabaed 100644 --- a/nvim/after/ftplugin/haskell.vim +++ b/nvim/after/ftplugin/haskell.vim @@ -1 +1,3 @@ -setlocal foldmethod< foldtext< +let g:haskall_test = 1 +setlocal foldmethod< +setlocal foldtext< diff --git a/nvim/after/syntax/cabal.vim b/nvim/after/syntax/cabal.vim index 8d98c34..8ced55f 100644 --- a/nvim/after/syntax/cabal.vim +++ b/nvim/after/syntax/cabal.vim @@ -1 +1,2 @@ -setlocal foldmethod< foldtext< +setlocal foldmethod< +setlocal foldtext< diff --git a/nvim/after/syntax/cabalconfig.vim b/nvim/after/syntax/cabalconfig.vim index 8d98c34..8ced55f 100644 --- a/nvim/after/syntax/cabalconfig.vim +++ b/nvim/after/syntax/cabalconfig.vim @@ -1 +1,2 @@ -setlocal foldmethod< foldtext< +setlocal foldmethod< +setlocal foldtext< diff --git a/nvim/after/syntax/nginx.vim b/nvim/after/syntax/nginx.vim index bf72a83..1e4e3af 100644 --- a/nvim/after/syntax/nginx.vim +++ b/nvim/after/syntax/nginx.vim @@ -4,4 +4,5 @@ " 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< commentstring=#%s +setlocal comments< +setlocal commentstring=#%s diff --git a/nvim/dotfiles/plugins-list.vim b/nvim/dotfiles/plugins-list.vim index ccd39a0..36c17c6 100644 --- a/nvim/dotfiles/plugins-list.vim +++ b/nvim/dotfiles/plugins-list.vim @@ -45,6 +45,9 @@ Plug 'vim-airline/vim-airline' Plug 'tpope/vim-obsession' Plug 'romainl/vim-qf' + if g:vim_ide + Plug 'dyng/ctrlsf.vim' + endif " }}} " Git {{{ diff --git a/nvim/plugin/editing.vim b/nvim/plugin/editing.vim index 46cbe9b..59b18d3 100644 --- a/nvim/plugin/editing.vim +++ b/nvim/plugin/editing.vim @@ -58,17 +58,23 @@ set commentstring=//%s " Cursor and Scrolling {{{ - set number relativenumber cursorline + + set number + set relativenumber + set 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 colorcolumn=81,101,121 + set nowrap + set colorcolumn=81,101,121 " }}} diff --git a/nvim/plugin/files.vim b/nvim/plugin/files.vim index da700db..14fa58f 100644 --- a/nvim/plugin/files.vim +++ b/nvim/plugin/files.vim @@ -20,23 +20,6 @@ nnoremap empty(&buftype) ? ":writewall\" : "\" command! -bang -nargs=* Rg call fzf#vim#grep(s:rg_cmd . ' --column --line-number --no-heading --fixed-strings --smart-case --color always ' . shellescape(), 1, 0) command! -bang -nargs=* Find Rg endif - - nnoremap / :grep - - function! s:grep_mapping_star_normal() - let word = expand("") - if !empty(word) - call feedkeys(":\grep " . shellescape('\b' . word . '\b'), 'n') - endif - endfunction - function! s:grep_mapping_star_visual() - let tmp = @" - normal! y - call feedkeys(":\grep " . shellescape(@"), 'n') - let @" = tmp - endfunction - nnoremap * call grep_mapping_star_normal() - xnoremap * call grep_mapping_star_visual() " }}} @@ -46,10 +29,7 @@ nnoremap empty(&buftype) ? ":writewall\" : "\" let g:loaded_netrwPlugin = 1 " re-add Netrw's gx mappings since we've disabled them nnoremap gx call netrw#BrowseX(expand(''),netrw#CheckIfRemote()) - " This one can be rewritten in a way to not clobber the yank register... - " Most notably, the built-in mapping, which uses netrw#BrowseXVis(), doesn't - " work and breaks the editor, at least for me. - xnoremap gx y:call netrw#BrowseX(@",netrw#CheckIfRemote()) + xnoremap gx call netrw#BrowseXVis() " }}} @@ -196,3 +176,10 @@ nnoremap empty(&buftype) ? ":writewall\" : "\" augroup END " }}} + + +" CtrlSF {{{ + nmap / CtrlSFPrompt + nmap * CtrlSFCwordPath + xmap * CtrlSFVwordPath +" }}}