mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-07 05:45:11 +01:00
Compare commits
2 Commits
cacfcb08f1
...
1a95a6dd3b
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a95a6dd3b | |||
| dd536a69af |
@@ -55,6 +55,9 @@ set -gx FZF_DEFAULT_COMMAND 'rg --files --no-ignore --hidden --follow --glob "!.
|
||||
set -gx FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
|
||||
set -gx FZF_ALT_C_COMMAND "$FZF_DEFAULT_COMMAND"
|
||||
|
||||
# Set HOSTNAME to the hostname of the device, without trailing domain name
|
||||
set -x HOSTNAME (hostname | string split -m1 '.')[1]
|
||||
|
||||
# Aliases
|
||||
## Listing
|
||||
alias ll 'ls -alF'
|
||||
@@ -133,6 +136,24 @@ function rgvim
|
||||
end
|
||||
end
|
||||
|
||||
function imready
|
||||
# Get return status and run time of last command, to be used with long-running jobs
|
||||
# e.g.: longrunning.sh; imready
|
||||
set laststatus $status
|
||||
if test $status = 0
|
||||
set result "success"
|
||||
else
|
||||
set result "failed with result $laststatus"
|
||||
end
|
||||
set duration (echo "$CMD_DURATION 1000" | awk '{printf "%.3fs", $1 / $2}')
|
||||
set resulttext "Result of command: $result (took: $duration)"
|
||||
|
||||
# Send a push message with summary
|
||||
if test -f "$HOME/workspace/projects/others/pushover.sh/pushover.sh"
|
||||
$HOME/workspace/projects/others/pushover.sh/pushover.sh -t "[$HOSTNAME] command finished" "$resulttext"
|
||||
end
|
||||
end
|
||||
|
||||
function jl
|
||||
# Pretty print the json file used as argument, and feed it in colour to less
|
||||
jq -C --indent 2 . $argv | less -R
|
||||
|
||||
36
.vimrc
36
.vimrc
@@ -422,32 +422,16 @@ let g:wiki_filetypes = ['md']
|
||||
let g:wiki_link_extension = '.md'
|
||||
let g:wiki_link_target_type = 'md'
|
||||
" let g:wiki_mappings_use_defaults = 1
|
||||
|
||||
|
||||
" vimwiki
|
||||
"Plug 'vimwiki/vimwiki', { 'branch': 'dev' }
|
||||
let wiki_1 = {}
|
||||
let wiki_1.path = '~/phren/'
|
||||
let wiki_1.syntax = 'markdown'
|
||||
let wiki_1.ext = '.md'
|
||||
|
||||
" vimwiki-markdown
|
||||
let wiki_1.template_path = '~/phren/templates/'
|
||||
let wiki_1.template_default = 'default'
|
||||
let wiki_1.path_html = '~/phren/site_html/'
|
||||
let wiki_1.custom_wiki2html = 'vimwiki_markdown'
|
||||
let wiki_1.template_ext = '.tpl'
|
||||
let $VIMWIKI_MARKDOWN_EXTENSIONS = 'wikilinks'
|
||||
|
||||
let g:vimwiki_list = [wiki_1]
|
||||
let g:vimwiki_ext2syntax = {'.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
|
||||
" Do not use vimwiki magic on non-wiki (markdown) files
|
||||
let g:vimwiki_global_ext = 0
|
||||
" Be smarter with file extensions
|
||||
let g:vimwiki_markdown_link_ext = 1
|
||||
|
||||
" Quick way of opening a window with backlinks to the current document
|
||||
nmap <leader>wb :VimwikiBacklinks <CR>
|
||||
"support for #tag style tags instead of :tag:
|
||||
let g:wiki_tags_format_pattern = '\v%(^|\s)#\zs[^# ]+'
|
||||
" number of lines from the top to scan for tags
|
||||
let g:wiki_tags_scan_num_lines = 500
|
||||
" search through the tags in the wiki
|
||||
nmap <leader>wf :WikiFzfTags <CR>
|
||||
" find backlinks to this document
|
||||
nmap <leader>wb :WikiGraphFindBacklinks <CR>
|
||||
" find in ToC/structure of the (markdown) file
|
||||
nmap <leader>ft :WikiFzfToc <CR>
|
||||
|
||||
|
||||
if $USER != 'root'
|
||||
|
||||
Reference in New Issue
Block a user