Compare commits

..

4 commits

Author SHA1 Message Date
pull[bot]
7cf73f8f1b
Merge pull request #243 from dmitmel/master
[pull] master from dmitmel:master
2021-04-25 22:05:46 +00:00
Dmytro Meleshko
2c6193a487 [nvim] collapse the set and setlocal commands because the Vimscript syntax allows it 2021-04-25 21:21:32 +03:00
Dmytro Meleshko
8198c861f4 [nvim] disable automatic folds in the fugitive window because they break the UI 2021-04-25 21:18:23 +03:00
Dmytro Meleshko
70acf70f0b [nvim] entirely get rid of the CtrlSF plugin 2021-04-25 21:02:00 +03:00
8 changed files with 28 additions and 28 deletions

View file

@ -0,0 +1 @@
setlocal nofoldenable foldmethod=manual

View file

@ -1,3 +1 @@
let g:haskall_test = 1 setlocal foldmethod< foldtext<
setlocal foldmethod<
setlocal foldtext<

View file

@ -1,2 +1 @@
setlocal foldmethod< setlocal foldmethod< foldtext<
setlocal foldtext<

View file

@ -1,2 +1 @@
setlocal foldmethod< setlocal foldmethod< foldtext<
setlocal foldtext<

View file

@ -4,5 +4,4 @@
" sourced in `syntax/nginx.vim` in vim-polyglot, which resets the `commentstring` " 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 " set in `ftplugin/nginx.vim` and sets `comments` to some garbage. This script
" undoes that damage. " undoes that damage.
setlocal comments< setlocal comments< commentstring=#%s
setlocal commentstring=#%s

View file

@ -45,9 +45,6 @@
Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline'
Plug 'tpope/vim-obsession' Plug 'tpope/vim-obsession'
Plug 'romainl/vim-qf' Plug 'romainl/vim-qf'
if g:vim_ide
Plug 'dyng/ctrlsf.vim'
endif
" }}} " }}}
" Git {{{ " Git {{{

View file

@ -58,23 +58,17 @@ set commentstring=//%s
" Cursor and Scrolling {{{ " Cursor and Scrolling {{{
set number relativenumber cursorline
set number
set relativenumber
set cursorline
" remember cursor position " remember cursor position
augroup vimrc-editing-remember-cursor-position augroup vimrc-editing-remember-cursor-position
autocmd! autocmd!
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exec "normal! g`\"" | endif autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exec "normal! g`\"" | endif
augroup END augroup END
" }}} " }}}
" Wrapping {{{ " Wrapping {{{
set nowrap set nowrap colorcolumn=81,101,121
set colorcolumn=81,101,121
" }}} " }}}

View file

@ -20,6 +20,23 @@ nnoremap <silent><expr> <CR> empty(&buftype) ? ":write<bar>wall\<CR>" : "\<CR>"
command! -bang -nargs=* Rg call fzf#vim#grep(s:rg_cmd . ' --column --line-number --no-heading --fixed-strings --smart-case --color always ' . shellescape(<q-args>), 1, <bang>0) command! -bang -nargs=* Rg call fzf#vim#grep(s:rg_cmd . ' --column --line-number --no-heading --fixed-strings --smart-case --color always ' . shellescape(<q-args>), 1, <bang>0)
command! -bang -nargs=* Find Rg<bang> <args> command! -bang -nargs=* Find Rg<bang> <args>
endif endif
nnoremap <leader>/ :<C-u>grep<space>
function! s:grep_mapping_star_normal()
let word = expand("<cword>")
if !empty(word)
call feedkeys(":\<C-u>grep " . shellescape('\b' . word . '\b'), 'n')
endif
endfunction
function! s:grep_mapping_star_visual()
let tmp = @"
normal! y
call feedkeys(":\<C-u>grep " . shellescape(@"), 'n')
let @" = tmp
endfunction
nnoremap <leader>* <Cmd>call <SID>grep_mapping_star_normal()<CR>
xnoremap <leader>* <Cmd>call <SID>grep_mapping_star_visual()<CR>
" }}} " }}}
@ -29,7 +46,10 @@ nnoremap <silent><expr> <CR> empty(&buftype) ? ":write<bar>wall\<CR>" : "\<CR>"
let g:loaded_netrwPlugin = 1 let g:loaded_netrwPlugin = 1
" re-add Netrw's gx mappings since we've disabled them " re-add Netrw's gx mappings since we've disabled them
nnoremap <silent> gx <Cmd>call netrw#BrowseX(expand('<cfile>'),netrw#CheckIfRemote())<CR> nnoremap <silent> gx <Cmd>call netrw#BrowseX(expand('<cfile>'),netrw#CheckIfRemote())<CR>
xnoremap <silent> gx <Cmd>call netrw#BrowseXVis()<CR> " 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 <silent> gx y:<C-u>call netrw#BrowseX(@",netrw#CheckIfRemote())<CR>
" }}} " }}}
@ -176,10 +196,3 @@ nnoremap <silent><expr> <CR> empty(&buftype) ? ":write<bar>wall\<CR>" : "\<CR>"
augroup END augroup END
" }}} " }}}
" CtrlSF {{{
nmap <leader>/ <Plug>CtrlSFPrompt
nmap <leader>* <Plug>CtrlSFCwordPath
xmap <leader>* <Plug>CtrlSFVwordPath
" }}}