2020-07-26 05:26:31 +02:00
|
|
|
" Declare tipical Vim preambule
|
2019-07-14 15:32:38 +02:00
|
|
|
" vint: -ProhibitSetNoCompatible
|
|
|
|
set nocompatible
|
|
|
|
filetype plugin indent on
|
|
|
|
syntax enable
|
|
|
|
|
2020-07-26 05:26:31 +02:00
|
|
|
" Set chrooted virtual runtime path
|
|
|
|
let rtp=$ROOT.'/rtp.vim'
|
|
|
|
exe 'source '.rtp
|
|
|
|
|
|
|
|
" Load Vader
|
|
|
|
let vader=$ROOT.'/vader'
|
|
|
|
exe 'set runtimepath+='.vader
|
2019-12-15 05:37:28 +01:00
|
|
|
|
2020-07-26 05:26:31 +02:00
|
|
|
" Declare default syntax
|
2019-07-14 15:32:38 +02:00
|
|
|
let vimwiki_default = {}
|
2019-12-15 05:37:28 +01:00
|
|
|
let vimwiki_default.path = $HOME . '/testwiki'
|
|
|
|
let vimwiki_default.path_html = $HOME . '/html/default'
|
2019-07-14 15:32:38 +02:00
|
|
|
let vimwiki_default.syntax = 'default'
|
|
|
|
let vimwiki_default.ext = '.wiki'
|
|
|
|
let vimwiki_default.name = 'DefaultSyntax'
|
2020-07-22 15:33:21 +02:00
|
|
|
let vimwiki_default.base_url = 'https://example.com/'
|
2019-07-14 15:32:38 +02:00
|
|
|
|
2020-07-26 05:26:31 +02:00
|
|
|
" Declare markdown syntax - https://github.github.com/gfm/
|
2019-07-14 15:32:38 +02:00
|
|
|
let vimwiki_markdown = {}
|
2019-12-15 05:37:28 +01:00
|
|
|
let vimwiki_markdown.path = $HOME . '/testmarkdown'
|
|
|
|
let vimwiki_markdown.path_html = $HOME . '/html/markdown'
|
2019-07-14 15:32:38 +02:00
|
|
|
let vimwiki_markdown.syntax = 'markdown'
|
|
|
|
let vimwiki_markdown.ext = '.md'
|
|
|
|
let vimwiki_markdown.name = 'MarkdownSyntax'
|
|
|
|
|
2020-07-26 05:26:31 +02:00
|
|
|
" Declare mediawiki syntax - https://www.mediawiki.org/wiki/Help:Formatting
|
2019-07-14 15:32:38 +02:00
|
|
|
let vimwiki_mediawiki = {}
|
2019-12-15 05:37:28 +01:00
|
|
|
let vimwiki_mediawiki.path = $HOME . '/testmediawiki'
|
|
|
|
let vimwiki_mediawiki.path_html = $HOME . '/html/mediawiki'
|
2020-05-22 23:44:11 +02:00
|
|
|
let vimwiki_mediawiki.syntax = 'media'
|
2019-07-14 15:32:38 +02:00
|
|
|
let vimwiki_mediawiki.ext = '.mw'
|
|
|
|
let vimwiki_mediawiki.name = 'MediaWikiSyntax'
|
|
|
|
|
2020-07-26 05:26:31 +02:00
|
|
|
" Register the 3 wikis
|
2019-07-14 15:32:38 +02:00
|
|
|
let g:vimwiki_list = [vimwiki_default, vimwiki_markdown, vimwiki_mediawiki]
|
2019-07-15 05:50:49 +02:00
|
|
|
|
2020-07-26 05:26:31 +02:00
|
|
|
" Set basic settings
|
2019-07-15 05:50:49 +02:00
|
|
|
set backspace=indent,eol,start
|
|
|
|
set wildmode=longest:full,full
|
|
|
|
set wildmenu
|
|
|
|
set wildignorecase
|
|
|
|
set splitbelow
|
|
|
|
set splitright
|
|
|
|
set timeoutlen=600
|
|
|
|
set ignorecase
|
|
|
|
set smartcase
|
|
|
|
set hidden
|
|
|
|
set laststatus=2
|
|
|
|
set hlsearch
|
|
|
|
|
2020-07-26 05:26:31 +02:00
|
|
|
" Map ctrl-p/n for history completion instead of up/down arrows
|
2019-07-15 05:50:49 +02:00
|
|
|
cnoremap <C-p> <Up>
|
|
|
|
cnoremap <C-n> <Down>
|
|
|
|
|
2020-07-26 05:26:31 +02:00
|
|
|
" Map jj to go back to command mode
|
2019-07-15 05:50:49 +02:00
|
|
|
inoremap jj <esc>
|
|
|
|
|
|
|
|
" Use <C-L> to clear the highlighting of :set hlsearch and also preserve the
|
|
|
|
" default behavior of redrawing the screen
|
|
|
|
if maparg('<C-L>', 'n') ==# ''
|
|
|
|
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
|
|
|
|
endif
|