VimWiki configuration
This commit is contained in:
parent
c4b8012957
commit
8041c66a7b
1
.alias
1
.alias
@ -6,4 +6,3 @@ alias dotf='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
|||||||
alias ls_dotfiels='/usr/bin/git --git-dir=$HOME/.dotfiles ls-tree --full-tree -r --name-only HEAD'
|
alias ls_dotfiels='/usr/bin/git --git-dir=$HOME/.dotfiles ls-tree --full-tree -r --name-only HEAD'
|
||||||
alias t="todo.sh"
|
alias t="todo.sh"
|
||||||
alias gl='git log --graph --pretty=format:'\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit --date=relative'
|
alias gl='git log --graph --pretty=format:'\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit --date=relative'
|
||||||
alias wiki="vim ~/vimwiki/wiki.wiki"
|
|
||||||
|
@ -62,3 +62,21 @@ function ip_to_hex(){
|
|||||||
function salt-call(){
|
function salt-call(){
|
||||||
sudo salt-call --local "$@"
|
sudo salt-call --local "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function wiki(){
|
||||||
|
local selected_wiki
|
||||||
|
selected_wiki="$1"
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
SUSE|suse|S|s|2)
|
||||||
|
vim -c "normal 2,ww"
|
||||||
|
;;
|
||||||
|
Private|private|p|2)
|
||||||
|
vim -c "normal 3,ww"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
vim -c "normal 1,ww"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
41
.vimrc
41
.vimrc
@ -6,6 +6,7 @@ set encoding=utf-8
|
|||||||
set autoindent
|
set autoindent
|
||||||
set nocompatible
|
set nocompatible
|
||||||
syntax on
|
syntax on
|
||||||
|
let mapleader=","
|
||||||
|
|
||||||
filetype indent plugin on
|
filetype indent plugin on
|
||||||
|
|
||||||
@ -15,15 +16,38 @@ set shiftwidth=4
|
|||||||
set softtabstop=4
|
set softtabstop=4
|
||||||
set expandtab
|
set expandtab
|
||||||
|
|
||||||
|
" Pathogen
|
||||||
|
execute pathogen#infect()
|
||||||
|
|
||||||
|
" vimwiki
|
||||||
|
let wiki_1 = {}
|
||||||
|
let wiki_1.path = '~/Nextcloud/vimwiki'
|
||||||
|
let wiki_1.syntax = 'markdown'
|
||||||
|
let wiki_1.ext = '.md'
|
||||||
|
let wiki_2 = {}
|
||||||
|
let wiki_2.path = '~/Nextcloud/vimwiki/suse'
|
||||||
|
let wiki_2.syntax = 'markdown'
|
||||||
|
let wiki_2.ext = '.md'
|
||||||
|
let wiki_3 = {}
|
||||||
|
let wiki_3.path = '~/Nextcloud/vimwiki/private'
|
||||||
|
let wiki_3.syntax = 'markdown'
|
||||||
|
let wiki_3.ext = '.md'
|
||||||
|
let g:vimwiki_list = [wiki_1, wiki_2, wiki_3]
|
||||||
|
|
||||||
" Set to show invisibles (tabs & trailing spaces) & their highlight color
|
" Set to show invisibles (tabs & trailing spaces) & their highlight color
|
||||||
set list listchars=tab:»\ ,trail:·
|
set list listchars=tab:»\ ,trail:·
|
||||||
|
|
||||||
|
" Mark characters 80+ on each line with red color
|
||||||
function! Highlight()
|
function! Highlight()
|
||||||
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
|
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
|
||||||
match OverLength /\%81v.\+/
|
match OverLength /\%81v.\+/
|
||||||
endfunction
|
endfunction
|
||||||
nnoremap _h :call Highlight()<CR>
|
|
||||||
|
|
||||||
|
" remaps
|
||||||
|
noremap <Leader>_h :call Highlight()<CR>
|
||||||
|
nmap <F2> i**<C-R>=strftime("%Y-%m-%d %H:%M:%S")<CR>**<CR><CR><Esc>
|
||||||
|
imap <F2> **<C-R>=strftime("%Y-%m-%d %H:%M:%S")<CR>**<CR><CR>
|
||||||
|
nmap <F8> c~<c-r>"~
|
||||||
|
|
||||||
""""""""""""""""""""
|
""""""""""""""""""""
|
||||||
" GnuPG Extensions "
|
" GnuPG Extensions "
|
||||||
@ -70,3 +94,18 @@ if has("autocmd")
|
|||||||
" Set filetype tab settings
|
" Set filetype tab settings
|
||||||
autocmd FileType python,doctest set ai ts=4 sw=4 sts=4 et
|
autocmd FileType python,doctest set ai ts=4 sw=4 sts=4 et
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
" vim-instant-markdown settings
|
||||||
|
"Uncomment to override defaults:
|
||||||
|
let g:instant_markdown_slow = 0
|
||||||
|
let g:instant_markdown_autostart = 0
|
||||||
|
let g:instant_markdown_open_to_the_world = 0
|
||||||
|
let g:instant_markdown_allow_unsafe_content = 0
|
||||||
|
let g:instant_markdown_allow_external_content = 1
|
||||||
|
"let g:instant_markdown_mathjax = 1
|
||||||
|
"let g:instant_markdown_browser = "firefox --new-window"
|
||||||
|
"let g:instant_markdown_logfile = '/tmp/instant_markdown.log'
|
||||||
|
"let g:instant_markdown_autoscroll = 0
|
||||||
|
"let g:instant_markdown_port = 8888
|
||||||
|
"let g:instant_markdown_python = 1
|
||||||
|
@ -9,3 +9,7 @@ packages:
|
|||||||
go: { status: installed }
|
go: { status: installed }
|
||||||
nextcloud-client: { status: installed }
|
nextcloud-client: { status: installed }
|
||||||
keepassxc: { status: installed }
|
keepassxc: { status: installed }
|
||||||
|
vim-plugin-gnupg: { status: installed }
|
||||||
|
# vim-instant-markdown
|
||||||
|
xdg-utils: { status: installed }
|
||||||
|
nodejs10 { status: installed }
|
||||||
|
Loading…
Reference in New Issue
Block a user