aboutsummaryrefslogtreecommitdiff
path: root/stow
diff options
context:
space:
mode:
Diffstat (limited to 'stow')
-rw-r--r--stow/sxiv/repos/sxiv/config.h4
-rw-r--r--stow/vim/.vim/autoload/plug.vim2
-rw-r--r--stow/vim/.vim/autoload/plug.vim.old28
-rw-r--r--stow/vim/.vim/ftplugin/sh/sh.vim4
-rw-r--r--stow/vim/.vim/ftplugin/tex/tex.vim9
-rw-r--r--stow/vim/.vim/rc/maps.vim2
-rw-r--r--stow/vim/.vimrc1
7 files changed, 30 insertions, 20 deletions
diff --git a/stow/sxiv/repos/sxiv/config.h b/stow/sxiv/repos/sxiv/config.h
index 10049ea..f8e6233 100644
--- a/stow/sxiv/repos/sxiv/config.h
+++ b/stow/sxiv/repos/sxiv/config.h
@@ -55,10 +55,10 @@ static const bool ALPHA_LAYER = false;
#ifdef _THUMBS_CONFIG
/* thumbnail sizes in pixels (width == height): */
-static const int thumb_sizes[] = { 32, 64, 96, 128, 160, 200, 260, 400, 450 };
+static const int thumb_sizes[] = { 32, 64, 96, 128, 160, 200, 260, 340, 400, 450 };
/* thumbnail size at startup, index into thumb_sizes[]: */
-static const int THUMB_SIZE = 3;
+static const int THUMB_SIZE = 7;
#endif
#ifdef _MAPPINGS_CONFIG
diff --git a/stow/vim/.vim/autoload/plug.vim b/stow/vim/.vim/autoload/plug.vim
index 652caa8..9c3011f 100644
--- a/stow/vim/.vim/autoload/plug.vim
+++ b/stow/vim/.vim/autoload/plug.vim
@@ -22,7 +22,7 @@
" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
"
" " On-demand loading
-" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
+" Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
" Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
"
" " Using a non-default branch
diff --git a/stow/vim/.vim/autoload/plug.vim.old b/stow/vim/.vim/autoload/plug.vim.old
index ad95041..652caa8 100644
--- a/stow/vim/.vim/autoload/plug.vim.old
+++ b/stow/vim/.vim/autoload/plug.vim.old
@@ -242,6 +242,8 @@ function! plug#begin(...)
let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p'))
elseif exists('g:plug_home')
let home = s:path(g:plug_home)
+ elseif has('nvim')
+ let home = stdpath('data') . '/plugged'
elseif !empty(&rtp)
let home = s:path(split(&rtp, ',')[0]) . '/plugged'
else
@@ -350,7 +352,7 @@ function! plug#end()
endif
let lod = { 'ft': {}, 'map': {}, 'cmd': {} }
- if exists('g:did_load_filetypes')
+ if get(g:, 'did_load_filetypes', 0)
filetype off
endif
for name in g:plugs_order
@@ -2619,26 +2621,34 @@ function! s:preview_commit()
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}')
if empty(sha)
- return
+ let name = matchstr(getline('.'), '^- \zs[^:]*\ze:$')
+ if empty(name)
+ return
+ endif
+ let title = 'HEAD@{1}..'
+ let command = 'git diff --no-color HEAD@{1}'
+ else
+ let title = sha
+ let command = 'git show --no-color --pretty=medium '.sha
+ let name = s:find_name(line('.'))
endif
- let name = s:find_name(line('.'))
if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir)
return
endif
if exists('g:plug_pwindow') && !s:is_preview_window_open()
execute g:plug_pwindow
- execute 'e' sha
+ execute 'e' title
else
- execute 'pedit' sha
+ execute 'pedit' title
wincmd P
endif
- setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable
+ setlocal previewwindow filetype=git buftype=nofile bufhidden=wipe nobuflisted modifiable
let batchfile = ''
try
let [sh, shellcmdflag, shrd] = s:chsh(1)
- let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha
+ let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && '.command
if s:is_win
let [batchfile, cmd] = s:batchfile(cmd)
endif
@@ -2764,9 +2774,9 @@ function! s:snapshot(force, ...) abort
1
let anchor = line('$') - 3
let names = sort(keys(filter(copy(g:plugs),
- \'has_key(v:val, "uri") && !has_key(v:val, "commit") && isdirectory(v:val.dir)')))
+ \'has_key(v:val, "uri") && isdirectory(v:val.dir)')))
for name in reverse(names)
- let sha = s:git_revision(g:plugs[name].dir)
+ let sha = has_key(g:plugs[name], 'commit') ? g:plugs[name].commit : s:git_revision(g:plugs[name].dir)
if !empty(sha)
call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha))
redraw
diff --git a/stow/vim/.vim/ftplugin/sh/sh.vim b/stow/vim/.vim/ftplugin/sh/sh.vim
index f716617..11ecb48 100644
--- a/stow/vim/.vim/ftplugin/sh/sh.vim
+++ b/stow/vim/.vim/ftplugin/sh/sh.vim
@@ -12,8 +12,8 @@ let mapleader = " "
nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/sh/sh.vim<CR><CR>
nnoremap <buffer> <leader>+x :!chmod 744 %<CR>
-nnoremap <buffer> <leader>x :w<CR>:!./%<Space>
-nnoremap <buffer> <leader>X :w<CR>:!./%<CR><CR>
+nnoremap <buffer> <leader>x :w<CR>:!./%<CR><CR>
+nnoremap <buffer> <leader>X :w<CR>:!./%<Space>
let mapleader = ","
diff --git a/stow/vim/.vim/ftplugin/tex/tex.vim b/stow/vim/.vim/ftplugin/tex/tex.vim
index 0893e40..3558c39 100644
--- a/stow/vim/.vim/ftplugin/tex/tex.vim
+++ b/stow/vim/.vim/ftplugin/tex/tex.vim
@@ -21,8 +21,7 @@ nnoremap <buffer> gd :lua vim.lsp.buf.definition()<CR>
nnoremap <buffer> <leader>c :w<Enter>:!toPDF.sh %<CR><CR>
nnoremap <buffer> <leader>o :w<Enter>:!toPDF.sh -o %<CR><CR>
nnoremap <buffer> <leader>O :w<Enter>:!toPDF.sh -o %<CR>
-nnoremap <buffer> <leader>m :w<Enter>:!make<CR><CR>
-nnoremap <buffer> <leader>M :w<Enter>:!make<CR>
+nnoremap <buffer> <leader>m :w<Enter>:Make<CR>
nnoremap <buffer> <leader>temp :-1r ~/.vim/ftplugin/tex/snips/template.txt<CR>/<+++><CR>cf>
@@ -43,8 +42,8 @@ inoremap <buffer> <leader>li \textit{}<++><Esc>F}i
inoremap <buffer> <leader>lemph \emph{}<++><Esc>F}i
inoremap <buffer> <leader>llabel \label{}<++><Esc>F}i
inoremap <buffer> <leader>lref ~\ref{}<++><Esc>F}i
-inoremap <buffer> <leader>lenumerate \begin{enumerate}<Esc>o<Enter><Enter><Enter>\end{enumerate}<Esc>kkI\item<Enter><Esc>I<Tab><++><Esc>k<<i<Tab><Esc>$a<Space>
-inoremap <buffer> <leader>litemize \begin{itemize}<Esc>o<Enter><Enter><Enter>\end{itemize}<Esc>kkI\item<Enter><Esc>I<Tab><++><Esc>k<<i<Tab><Esc>$a<Space>
-inoremap <buffer> <leader>litem \item<Enter><++><Esc>k$a<Space>
+inoremap <buffer> <leader>lenumerate \begin{enumerate}<Esc>o<Enter><Enter><Enter>\end{enumerate}<Esc>kkI\item<Enter><Esc>I<Tab><++><Esc>kA<Space>
+inoremap <buffer> <leader>litemize \begin{itemize}<Esc>o<Enter><Enter><Enter>\end{itemize}<Esc>kkI\item<Enter><Esc>I<Tab><++><Esc>kA<Space>
+inoremap <buffer> <leader>litem \item<Enter><++><Esc>kA<Space>
inoremap <buffer> <leader>limage \begin{figure}[h]<Enter>\begin{center}<Enter>\includegraphics[width=\textwidth]{}<Enter>\caption{<++>}<Enter>\end{center}<Enter>\end{figure}<Enter><++><Esc>4k$i
inoremap <buffer> <leader>ltable \begin{table}[h]<Enter>\makebox[\linewidth]{<Enter>\begin{tabular}{c<Space>cxxx}<Enter>\toprule<Enter><++><Space>&<Space><++><Space>\\<Enter>\midrule<Enter><++><Space>&<Space><++><Space>\\<Enter>\bottomrule<Enter>\end{tabular}<Enter>}<Enter>\end{table}<Enter><++><Esc>?xxx<Enter>cw
diff --git a/stow/vim/.vim/rc/maps.vim b/stow/vim/.vim/rc/maps.vim
index 2163f0d..3d3b80a 100644
--- a/stow/vim/.vim/rc/maps.vim
+++ b/stow/vim/.vim/rc/maps.vim
@@ -3,7 +3,7 @@
nnoremap Y y$
nnoremap <leader>x :w<CR>:! ./%
inoremap <leader>w <Esc>:w<Enter>
-inoremap <leader><leader> <Esc>/<++><Enter>cf>
+inoremap <leader><leader> <Esc>/<++><Enter>"_cf>
" Showing tabs and trailing spaces
nnoremap <leader>l :set list!<CR>
diff --git a/stow/vim/.vimrc b/stow/vim/.vimrc
index 9ef44be..1320512 100644
--- a/stow/vim/.vimrc
+++ b/stow/vim/.vimrc
@@ -19,6 +19,7 @@ Plug 'dylanaraps/wal.vim'
Plug 'arcticicestudio/nord-vim'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
+Plug 'tpope/vim-dispatch'
"Plug 'psliwka/vim-smoothie'
Plug 'neovim/nvim-lspconfig'
source ~/.vim/rc/goyo.vim