updates for headless server

This commit is contained in:
Solomon Laing 2023-02-07 07:41:12 +10:30
parent d66226015b
commit aee457eb35
5 changed files with 119 additions and 113 deletions

View File

@ -1,3 +1,5 @@
#!/bin/bash
# If not running interactively, don't do anything # If not running interactively, don't do anything
case $- in case $- in
*i*) ;; *i*) ;;
@ -28,6 +30,12 @@ shopt -s checkwinsize
# colored GCC warnings and errors # colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# Add some custom keybinds
bind '"\C-o":"lfcd\n"'
bind '"\C-t":"tms\n"'
bind '"\C-n":"zk edit --interactive --sort modified-\n"'
# use lf to switch directories and bind it to ctrl-o # use lf to switch directories and bind it to ctrl-o
function lfcd() { function lfcd() {
tmp="$(mktemp -uq)" tmp="$(mktemp -uq)"

View File

@ -3,7 +3,7 @@ if not status_ok then
return return
end end
configs.setup { configs.setup({
ensure_installed = "all", -- one of "all" or a list of languages ensure_installed = "all", -- one of "all" or a list of languages
sync_install = false, -- install languages synchronously (only applied to `ensure_installed`) sync_install = false, -- install languages synchronously (only applied to `ensure_installed`)
ignore_install = { "phpdoc" }, -- List of parsers to ignore installing ignore_install = { "phpdoc" }, -- List of parsers to ignore installing
@ -108,4 +108,4 @@ configs.setup {
}, },
}, },
}, },
} })

View File

@ -18,7 +18,6 @@ return {
"help", "help",
"javascript", "javascript",
"typescript", "typescript",
"sql",
"html", "html",
"jsonc", "jsonc",
}, },

View File

@ -1,9 +1,5 @@
$include /etc/inputrc $include /etc/inputrc
Control-o: lfcd
Control-t: tms
Control-n: zk edit --interactive --sort modified-
set editing-mode vi set editing-mode vi
$if mode=vi $if mode=vi

View File

@ -35,7 +35,8 @@ export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions # Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='nano' # Probably shoud be vim or vi or even nano but it's annoying me.
export EDITOR='nvim'
else else
export EDITOR='nvim' export EDITOR='nvim'
fi fi
@ -189,6 +190,8 @@ fi
if [ "$HOST" = "holocene" ] ; then if [ "$HOST" = "holocene" ] ; then
source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh
elif [ "$HOST" = "boost" ] ; then
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
else else
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi fi