Compare commits

..

No commits in common. "7cf73f8f1b4f5f15a3137674b57baffdcdbe1aff" and "dfb5750295ffcbe5bc3051405ace296414c7999a" have entirely different histories.

8 changed files with 28 additions and 28 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -20,23 +20,6 @@ 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>
" }}}
@ -46,10 +29,7 @@ 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>
" 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>
xnoremap <silent> gx <Cmd>call netrw#BrowseXVis()<CR>
" }}}
@ -196,3 +176,10 @@ 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
" }}}