mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
Compare commits
3 commits
0ec9d1ded1
...
da7c44af35
Author | SHA1 | Date | |
---|---|---|---|
|
da7c44af35 | ||
|
618995cc7f | ||
|
a27c05856a |
3 changed files with 8 additions and 2 deletions
|
@ -152,6 +152,11 @@ set commentstring=//%s
|
||||||
\|xmap # <Cmd>call <SID>VisualStarSearch('?')<CR>N
|
\|xmap # <Cmd>call <SID>VisualStarSearch('?')<CR>N
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
" <https://vim.fandom.com/wiki/Searching_for_expressions_which_include_slashes#Searching_for_slash_as_normal_text>
|
||||||
|
command! -nargs=+ Search let @/ = escape(<q-args>, '/') | normal /<C-R>/<CR>
|
||||||
|
" <https://vim.fandom.com/wiki/Searching_for_expressions_which_include_slashes#Searching_for_all_characters_as_normal_text>
|
||||||
|
command! -nargs=+ SearchLiteral let @/ = '\V'.escape(<q-args>, '/\') | normal /<C-R>/<CR>
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -144,9 +144,9 @@ nnoremap <silent><expr> <CR> empty(&buftype) ? ":write<bar>wall\<CR>" : "\<CR>"
|
||||||
function s:FixWhitespaceOnSave()
|
function s:FixWhitespaceOnSave()
|
||||||
let l:pos = getpos('.')
|
let l:pos = getpos('.')
|
||||||
" remove trailing whitespace
|
" remove trailing whitespace
|
||||||
%s/\s\+$//e
|
keeppatterns %s/\s\+$//e
|
||||||
" remove trailing newlines
|
" remove trailing newlines
|
||||||
%s/\($\n\s*\)\+\%$//e
|
keeppatterns %s/\($\n\s*\)\+\%$//e
|
||||||
call setpos('.', l:pos)
|
call setpos('.', l:pos)
|
||||||
endfunction
|
endfunction
|
||||||
" }}}
|
" }}}
|
||||||
|
|
|
@ -83,6 +83,7 @@ declare -A date_formats=(
|
||||||
compact '%Y%m%d%H%M%S'
|
compact '%Y%m%d%H%M%S'
|
||||||
only-date '%Y-%m-%d'
|
only-date '%Y-%m-%d'
|
||||||
only-time '%H:%M:%S'
|
only-time '%H:%M:%S'
|
||||||
|
timestamp '%s'
|
||||||
)
|
)
|
||||||
|
|
||||||
for format_name format in "${(kv)date_formats[@]}"; do
|
for format_name format in "${(kv)date_formats[@]}"; do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue