nvim: move obsidian to syncthing
This commit is contained in:
2
init.lua
2
init.lua
@@ -162,7 +162,7 @@ map('v', '>', '>gv')
|
|||||||
-- fzf
|
-- fzf
|
||||||
nmap('<leader>ff', ':Files<CR>')
|
nmap('<leader>ff', ':Files<CR>')
|
||||||
nmap('<leader>ft', ':Files ~/Tmp<CR>')
|
nmap('<leader>ft', ':Files ~/Tmp<CR>')
|
||||||
nmap('<leader>fo', ":call fzf#run(fzf#wrap(fzf#vim#with_preview({ 'source': 'fd . --type f --extension=md --follow --exclude .git ~/ownCloud/Obsidian/Personal' })))<CR>", { silent = true })
|
nmap('<leader>fo', ":call fzf#run(fzf#wrap(fzf#vim#with_preview({ 'source': 'fd . --type f --extension=md --follow --exclude .git ~/Syncthing/Obsidian/Personal' })))<CR>", { silent = true })
|
||||||
|
|
||||||
-- vim-easy-align
|
-- vim-easy-align
|
||||||
map('x', 'ga', ':EasyAlign<CR>') -- TODO: this should allow for gaip, but does not
|
map('x', 'ga', ':EasyAlign<CR>') -- TODO: this should allow for gaip, but does not
|
||||||
|
|||||||
26
vim/.vimrc
26
vim/.vimrc
@@ -7,7 +7,6 @@
|
|||||||
" -> General
|
" -> General
|
||||||
" ========================================================
|
" ========================================================
|
||||||
|
|
||||||
set fileencoding=utf-8
|
|
||||||
nnoremap <Space> <Nop>
|
nnoremap <Space> <Nop>
|
||||||
let mapleader=' '
|
let mapleader=' '
|
||||||
|
|
||||||
@@ -168,9 +167,10 @@ if has('nvim') || has('gui_running')
|
|||||||
let $FZF_DEFAULT_OPTS .= ' --no-info --color=gutter:#2E3440'
|
let $FZF_DEFAULT_OPTS .= ' --no-info --color=gutter:#2E3440'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
command! -nargs=? -complete=dir AF
|
" Obsidian
|
||||||
|
command! FO
|
||||||
\ call fzf#run(fzf#wrap(fzf#vim#with_preview({
|
\ call fzf#run(fzf#wrap(fzf#vim#with_preview({
|
||||||
\ 'source': 'fd --type f --hidden --follow --exclude .git --no-ignore . '.expand(<q-args>)
|
\ 'source': 'fd . --type f --extension=md --follow --exclude .git ~/Syncthing/Obsidian/Personal'
|
||||||
\ })))
|
\ })))
|
||||||
|
|
||||||
let g:fzf_preview_window = ''
|
let g:fzf_preview_window = ''
|
||||||
@@ -415,6 +415,7 @@ nnoremap <silent><leader>ga :Gwrite<CR>
|
|||||||
nnoremap <silent><leader>gs :Git<CR>
|
nnoremap <silent><leader>gs :Git<CR>
|
||||||
nnoremap <silent><leader>gb :Git blame<CR>
|
nnoremap <silent><leader>gb :Git blame<CR>
|
||||||
|
|
||||||
|
nnoremap <silent><leader>t :tabnew<CR>
|
||||||
nnoremap <silent><Tab> :tabnext<CR>
|
nnoremap <silent><Tab> :tabnext<CR>
|
||||||
nnoremap <silent><S-Tab> :tabprevious<CR>
|
nnoremap <silent><S-Tab> :tabprevious<CR>
|
||||||
|
|
||||||
@@ -456,16 +457,11 @@ xmap ga <Plug>(EasyAlign)
|
|||||||
nmap ga <Plug>(EasyAlign)
|
nmap ga <Plug>(EasyAlign)
|
||||||
|
|
||||||
|
|
||||||
nnoremap <silent><expr><leader>e (expand('%') =~ 'NERD_tree' ? "\<C-w>\<C-w>" : '').":Files ~/Tmp\<CR>"
|
nnoremap <silent><expr><leader>ft (expand('%') =~ 'NERD_tree' ? "\<C-w>\<C-w>" : '').":Files ~/Tmp\<CR>"
|
||||||
nnoremap <leader>E :e ~/Tmp/
|
nnoremap <leader>T :e ~/Tmp/
|
||||||
|
|
||||||
" TODO Ignore .obsidian/
|
nnoremap <silent><expr><leader>fo (expand('%') =~ 'NERD_tree' ? "\<C-w>\<C-w>" : '').":FO<CR>"
|
||||||
nnoremap <silent><expr><leader>o (expand('%') =~ 'NERD_tree' ? "\<C-w>\<C-w>" : '').":Files ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Personal\<CR>"
|
nnoremap <leader>O :e ~/ownCloud/Obsidian/Personal
|
||||||
nnoremap <leader>O :e ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Personal
|
|
||||||
|
|
||||||
" EXPERIMENTAL STUFF
|
|
||||||
nnoremap <leader>ft <cmd>Telescope find_files<cr>
|
|
||||||
" nmap <leader>ft <cmd>Telescope live_grep<cr>
|
|
||||||
|
|
||||||
" undo break points
|
" undo break points
|
||||||
inoremap , ,<c-g>u
|
inoremap , ,<c-g>u
|
||||||
@@ -473,8 +469,7 @@ inoremap . .<c-g>u
|
|||||||
inoremap ! !<c-g>u
|
inoremap ! !<c-g>u
|
||||||
inoremap ? ?<c-g>u
|
inoremap ? ?<c-g>u
|
||||||
|
|
||||||
" Fix gx
|
" Fix gx https://github.com/vim/vim/issues/4738#issuecomment-856925080
|
||||||
" https://github.com/vim/vim/issues/4738#issuecomment-856925080
|
|
||||||
nnoremap <silent> gx :execute 'silent! !open ' . shellescape(expand('<cWORD>'), 1)<cr>
|
nnoremap <silent> gx :execute 'silent! !open ' . shellescape(expand('<cWORD>'), 1)<cr>
|
||||||
|
|
||||||
lua <<EOF
|
lua <<EOF
|
||||||
@@ -541,9 +536,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require("luasnip.loaders.from_snipmate").load()
|
require("luasnip.loaders.from_snipmate").load()
|
||||||
|
|
||||||
local function prequire(...)
|
local function prequire(...)
|
||||||
|
|||||||
Reference in New Issue
Block a user