move vim and neovim to completely XDG Spec compliant dirs; also add option for profile in w3m-splits

This commit is contained in:
JesseBot 2022-12-21 11:22:44 +01:00
parent 1f19b181a1
commit ab1208cbea
No known key found for this signature in database
GPG key ID: C01D207CE04D55D9
16 changed files with 72 additions and 24 deletions

View file

@ -3,7 +3,9 @@
# this is for the kubernetes plugin manager, krew
export PATH="${PATH}:${HOME}/.krew/bin"
export KUBECONFIG=~/.kube/kubeconfig
export KUBECONFIG=~/.config/kube/config
export DOMAIN="example.com"

View file

@ -46,10 +46,9 @@ export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
GOROOT=$HOME
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
# ~~~~~~~~~~~~~~~~~~~~~~~~ other ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Make grade use XDG
# Make gradle use XDG
export GRADLE_USER_HOME=$XDG_DATA_HOME/gradle
export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc"

View file

@ -3,6 +3,9 @@
# Default, in order of preference (subject to availability): nvim, vim, vi
# ------------------------------------------------------------------------- #
# make vim use the XDG Base Dir Spec (store in ~/.config/vim/vimrc)
alias vim="VIMINIT='source "$XDG_CONFIG_HOME/vim/vimrc"' vim"
# Default EDITOR is nvim
if [ -n "$(which nvim)" ]; then
export EDITOR=nvim

View file

@ -11,6 +11,9 @@ source ~/.config/neomutt/themes/spacechalk/neomutt_spacechalk_colors.muttrc
# powerline for status lines and pager lines
source ~/.config/neomutt/themes/spacechalk/powerline.neomuttrc
# ------------------------- Temp files ---------------------------
set certificate_file=~/.local/state/neomutt/certificates
# ------------- index settings, your list of emails -------------
#

View file

@ -3,8 +3,13 @@
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- set XDG viminfo location
-- vim.cmd [[set viminfofile=~/.local/state/nvim/viminfo]]
vim.opt.viminfofile = '~/.local/state/nvim/viminfo'
-- turn off the mouse scrolling because it is confusing
vim.cmd [[set mousescroll=ver:0,hor:0]]
-- vim.cmd [[set mousescroll=ver:0,hor:0]]
vim.opt.mousescroll = 'ver:0,hor:0'
-- line numbers for debugging and screen sharing, takes up 4 columns
vim.opt.number = true
@ -19,14 +24,16 @@ vim.opt.colorcolumn = '80'
-- vim.opt.termguicolors to enable highlight groups
vim.opt.termguicolors = true
-- do not try to indent the starting dashboard
vim.g.indentLine_fileTypeExclude = [['dashboard']]
-- both of these are required to make packer, our plugin manager work
-- both of these are required to make packer, our plugin manager, work
require('plugins')
vim.cmd [[source ~/.config/nvim/packerinit.vim]]
vim.cmd.source("~/.config/nvim/packerinit.vim")
-- Colors need to be enabled after the plugins, because the colors are a plugin
vim.cmd [[colorscheme spacechalk]]
vim.cmd.colorscheme('spacechalk')
vim.g.colors_name = 'spacechalk'
-- --------- these are plugin configs for plugins imported by packer ---------
require('user.nvim-tree')

View file

@ -1,4 +1,4 @@
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
-- This file can be loaded by calling `lua require('plugins')` from your init.config/vim
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
@ -18,20 +18,20 @@ return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
-- adds a pretty status line -- 'vim-airline/vim-airline'
use '~/.vim/plugged/vim-airline'
use 'vim-airline/vim-airline'
-- my preferred colorscheme right now -- use 'jessebot/spacechalk'
use '~/.vim/plugged/spacechalk'
-- preferred colorscheme right now
use {'jessebot/spacechalk'}
-- startup screen for neovim
use 'glepnir/dashboard-nvim'
use {'glepnir/dashboard-nvim'}
-- cute halloween dashboard for neovim start screen :3
-- not sure why this doesn't work, so it's commented out
-- use 'folke/drop.nvim'
-- this is a modern fuzzy searcher
use '~/.vim/plugged/vim-clap'
use 'liuchengxu/vim-clap'
-- ------------ telescope: extendable fuzzy finder over lists ------------
use {'nvim-telescope/telescope.nvim', tag = '0.1.0',
@ -40,11 +40,11 @@ return require('packer').startup(function(use)
-- ------------------------------ git ------------------------------------
-- git plugin for running git commands with :git -- 'tpope/vim-fugitive'
use '~/.vim/plugged/vim-fugitive'
use 'tpope/vim-fugitive'
-- puts a git + or - in side line to show git changes in file
-- 'airblade/vim-gitgutter'
use '~/.vim/plugged/vim-gitgutter'
use 'airblade/vim-gitgutter'
-- ----------- nvim new nerdtree replacement needs this :) ---------------
use {'nvim-tree/nvim-tree.lua',
@ -59,28 +59,28 @@ return require('packer').startup(function(use)
-- general linter - will use common linters and highlight broken code
-- 'dense-analysis/ale'
use '~/.vim/plugged/ale'
use {'dense-analysis/ale'}
-- syntax highlighting for neovim
use {'nvim-treesitter/nvim-treesitter'}
-- terraform linter -- 'hashivim/vim-terraform'
use '~/.vim/plugged/vim-terraform'
use {'hashivim/vim-terraform'}
-- bash tab completion -- 'WolfgangMehner/bash-support'
use '~/.vim/plugged/bash-support'
use {'WolfgangMehner/bash-support'}
-- yaml syntax highlighting better -- 'stephpy/vim-yaml'
use '~/.vim/plugged/vim-yaml'
use {'stephpy/vim-yaml'}
-- this is helpful for python highlighting
use {'numirias/semshi', run = ':UpdateRemoteuseins'}
-- This is helpful for markdown -- 'junegunn/limelight.vim'
use '~/.vim/plugged/limelight.vim'
-- This is helpful for markdown -- 'junegunn/limelight.config/vim'
use {'junegunn/limelight.vim'}
-- logging syntax and highlighting -- 'mtdl9/vim-log-highlighting'
use '~/.vim/plugged/vim-log-highlighting'
use {'mtdl9/vim-log-highlighting'}
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins

View file

View file

@ -2,6 +2,38 @@
" "vimrc of @jessebot on GitHub"
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
" Support XDG Base Directory Spec
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if empty($MYVIMRC) | let $MYVIMRC = expand('<sfile>:p') | endif
if empty($XDG_CACHE_HOME) | let $XDG_CACHE_HOME = $HOME."/.cache" | endif
if empty($XDG_CONFIG_HOME) | let $XDG_CONFIG_HOME = $HOME."/.config" | endif
if empty($XDG_DATA_HOME) | let $XDG_DATA_HOME = $HOME."/.local/share" | endif
if empty($XDG_STATE_HOME) | let $XDG_STATE_HOME = $HOME."/.local/state" | endif
set runtimepath^=$XDG_CONFIG_HOME/vim
set runtimepath+=$XDG_DATA_HOME/vim
set runtimepath+=$XDG_CONFIG_HOME/vim/after
set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim
set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after
let g:netrw_home = $XDG_DATA_HOME."/vim"
call mkdir($XDG_DATA_HOME."/vim/spell", 'p', 0700)
set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p', 0700)
set directory=$XDG_STATE_HOME/vim/swap | call mkdir(&directory, 'p', 0700)
set undodir=$XDG_STATE_HOME/vim/undo | call mkdir(&undodir, 'p', 0700)
set viewdir=$XDG_STATE_HOME/vim/view | call mkdir(&viewdir, 'p', 0700)
if !has('nvim') " Neovim has its own special location
set viminfofile=$XDG_STATE_HOME/vim/viminfo
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" GENERAL ALL MODES:
" "line numbers, cursorline, etc,"
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

View file

@ -13,7 +13,9 @@ import argparse
# parse args
parser = argparse.ArgumentParser()
parser.add_argument("html_file",
help="html or website to view in w3m in an iterm2 split")
help="html file or URL to view in w3m in an iTerm2 split")
parser.add_argument("--profile", "-p", type=str, default="Minimal",
help="iTerm2 profile you'd like to use in the new split.")
args = parser.parse_args()
@ -28,7 +30,7 @@ async def main(connection):
# Create split pane to the right and make the right one active
left_pane = app.current_terminal_window.current_tab.current_session
right_pane = await left_pane.async_split_pane(vertical=True,
profile="Minimal Profile")
profile=args.profile)
# send the command to the newly created split
w3m = ("w3m -sixel -o auto_image=TRUE -o display_image=1 -T text/html"