Compare commits
3 Commits
0ec9d1ded1
...
da7c44af35
Author | SHA1 | Date |
---|---|---|
Dmytro Meleshko | da7c44af35 | |
Dmytro Meleshko | 618995cc7f | |
Dmytro Meleshko | a27c05856a |
|
@ -152,6 +152,11 @@ set commentstring=//%s
|
|||
\|xmap # <Cmd>call <SID>VisualStarSearch('?')<CR>N
|
||||
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()
|
||||
let l:pos = getpos('.')
|
||||
" remove trailing whitespace
|
||||
%s/\s\+$//e
|
||||
keeppatterns %s/\s\+$//e
|
||||
" remove trailing newlines
|
||||
%s/\($\n\s*\)\+\%$//e
|
||||
keeppatterns %s/\($\n\s*\)\+\%$//e
|
||||
call setpos('.', l:pos)
|
||||
endfunction
|
||||
" }}}
|
||||
|
|
|
@ -83,6 +83,7 @@ declare -A date_formats=(
|
|||
compact '%Y%m%d%H%M%S'
|
||||
only-date '%Y-%m-%d'
|
||||
only-time '%H:%M:%S'
|
||||
timestamp '%s'
|
||||
)
|
||||
|
||||
for format_name format in "${(kv)date_formats[@]}"; do
|
||||
|
|
Loading…
Reference in New Issue