Merge pull request #243 from dmitmel/master

[pull] master from dmitmel:master
This commit is contained in:
pull[bot] 2021-04-25 22:05:46 +00:00 committed by GitHub
commit 7cf73f8f1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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<
setlocal foldtext<
setlocal foldmethod< foldtext<

View file

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

View file

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

View file

@ -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

View file

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

View file

@ -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
" }}}

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=* Find Rg<bang> <args>
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
" re-add Netrw's gx mappings since we've disabled them
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
" }}}
" CtrlSF {{{
nmap <leader>/ <Plug>CtrlSFPrompt
nmap <leader>* <Plug>CtrlSFCwordPath
xmap <leader>* <Plug>CtrlSFVwordPath
" }}}