From 2e11b2f5add28f615eb409e302e808bcc1875abe Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 14 Oct 2023 00:06:48 +0200 Subject: [PATCH 1/7] std conda --- .config/nvim | 2 +- .zshrc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/nvim b/.config/nvim index eaf8f41..adefa8f 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit eaf8f415e52271552675b539544fdc0dd10192a2 +Subproject commit adefa8fe764623748f29896900a95bff37c0e372 diff --git a/.zshrc b/.zshrc index 87756f8..016cb4b 100644 --- a/.zshrc +++ b/.zshrc @@ -183,3 +183,6 @@ else eval "$(zoxide init zsh)" fi +### --- conda Config ------------------------------------ +# try first ask later +conda activate std &> /dev/null From 861d92dcd426c753888d52ab494853ebb083d9c9 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 28 Oct 2023 23:27:11 +0200 Subject: [PATCH 2/7] disable cb GUI --- .zshrc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.zshrc b/.zshrc index 016cb4b..f02ea50 100644 --- a/.zshrc +++ b/.zshrc @@ -6,6 +6,13 @@ export editor=nvim export XDG_CONFIG_HOME=~/.config export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P' export ZSH=$HOME/.zsh +export CLIPBOARD_NOGUI=1 # wayland only allows GUI apps to use the clipboard. + # cb would have to open every 2 seconds and steal + # focus. This sucks, so I will have to disable GUI + # integration (yes that means ctrl+v) for now. + # + # see https://github.com/Slackadays/Clipboard/issues/171 + ### Aliases alias l="lsd -lah" @@ -22,6 +29,7 @@ alias gg=lazygit alias reload="source ~/.zshrc" alias gls=/bin/ls alias neorg='nvim -c "Neorg workspace $1"' +alias accon="HOST=$(hostname) conda activate" ### non standard aliases if [ -f ~/.zsh_aliases ]; then @@ -39,6 +47,10 @@ function cachekeys () { exec 2>/dev/null; function newpass() { LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-$0} } +function condac() { + conda activate $@ + export HOST=$(hostname) +} # TODO: make neorg a function, take a workspace as arg ### ---- zsh options ------------------------------------- @@ -182,7 +194,3 @@ then else eval "$(zoxide init zsh)" fi - -### --- conda Config ------------------------------------ -# try first ask later -conda activate std &> /dev/null From 7db8503e413c61808097af4e91e9902c296505e9 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 28 Oct 2023 23:27:28 +0200 Subject: [PATCH 3/7] update nvim --- .config/nvim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim b/.config/nvim index adefa8f..3b4586d 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit adefa8fe764623748f29896900a95bff37c0e372 +Subproject commit 3b4586d60019785aa59e0d824a31f283de75d2c3 From e2475241a40cfe01332221f94092fedea3cabf45 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 8 Nov 2023 20:42:51 +0100 Subject: [PATCH 4/7] demo and gotemp --- .zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index f02ea50..99c828d 100644 --- a/.zshrc +++ b/.zshrc @@ -1,5 +1,5 @@ ### ENVVARS -PATH="/usr/bin:/usr/sbin:$HOME/.local/bin:$HOME/.cargo/bin:/usr/local/bin" +PATH="/usr/bin:/usr/sbin:$HOME/.local/bin:$HOME/.cargo/bin:/usr/local/bin:$HOME/.deno/bin" export PATH export EDITOR=nvim export editor=nvim @@ -30,6 +30,7 @@ alias reload="source ~/.zshrc" alias gls=/bin/ls alias neorg='nvim -c "Neorg workspace $1"' alias accon="HOST=$(hostname) conda activate" +alias gotemp="cd $(mktemp -d)" ### non standard aliases if [ -f ~/.zsh_aliases ]; then From c650ca8cc2059a60e20b98baacdca4c8f632e0ab Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 8 Nov 2023 20:42:54 +0100 Subject: [PATCH 5/7] vimrc --- .gitignore | 1 + .vimrc | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 .vimrc diff --git a/.gitignore b/.gitignore index a32dde6..4a4b2ed 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # except: !.zshrc +!.vimrc !.config !.config/nvim !.config/nvim/** diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..107e589 --- /dev/null +++ b/.vimrc @@ -0,0 +1,129 @@ +" GENERAL CONFIGS ---------------------------------------------------------------------------------- +syntax on " syntax highlighting +set nocompatible " disable compatibility to old-time vi +set number +set nocompatible +set hlsearch " highlight search +set incsearch " incremental search +set tabstop=4 " number of columns occupied by a tab +set softtabstop=4 " see multiple spaces as tab stops so does the right thing +set expandtab " converts tabs to white space +set shiftwidth=4 " width for auto indents +set autoindent " indent a new line the same amount as the line just typed +set number " add line numbers +set wildmode=longest,list " get bash-like tab completions +set cc=100 " set an 100 column border for good coding style +set mouse=a " enable mouse for help file editing and hitting prompts +set cursorline " highlight current cursor line +set ttyfast " Speed up scrolling in Vim +set fdm=indent " folding method syntax +set foldlevel=10 " only fold when a certain complexity is reached by default. + " This applies only at startup. +set numberwidth=4 " How much space the line numbers should take +set signcolumn=yes " Show extra icons in the line numbers (like git marks, errors) +set timeout timeoutlen=400 " How long to wait for non prefix free hotkey melodies +set ttimeoutlen=0 + +" Avoid showing message extra message when using completion +set shortmess+=c + +"allow auto-indenting depending on file type +filetype plugin indent on +filetype plugin on + + +let g:indentLine_char = '│' + +" HOTKEYS ------------------------------------------------------------------------------------------ +" add lines with double o +noremap oo o +noremap OO O + +" H and L for end and beginning +nmap H ^ +nmap L $ +vmap H ^ +vmap L $ + +" useful functions for arrow keys +" (and force the user to use `hjkl`) + +" right/left to add/remove a tab in the beginning of the line. +nmap << +nmap >> +" same for visual mode (plus reselecting stuff for visual mode) +vmap >gv + +" up and down move lines up and down +nmap :m -2 +nmap :m +1 +" same for visual mode (plus reselecting stuff for visual mode) +vmap :m -2 +vmap :m +1 + +" resize windows +nnoremap :vertical resize -1 +nnoremap :vertical resize +1 +nnoremap :resize -1 +nnoremap :resize +1 + +" hit F3 to toggle search highlighting" +nnoremap :set hlsearch! + +nnoremap +let mapleader=" " +map t :echo "leader tested!" +map h :noh + +" copy to Wayland clipboard when leader is used. (note, install gvim for this) +vnoremap wy y :call system("wl-copy", @") +nnoremap wY Y :call system("wl-copy", @") +nnoremap wy y :call system("wl-copy", @") +nnoremap wyy yy :call system("wl-copy", @") + +" copy to system clipboard when leader is used. (note, install gvim for this) +vnoremap y "+y +nnoremap Y "+Y +nnoremap y "+y +nnoremap yy "+yy + +" don't write the pasted upon stuff in visual mode into the register +vnoremap p pgvy + +" open terminal with F12 +nnoremap :terminal + +" vsplit with , then " +map " :vsplit + +" split with , then %" +map % :split + +" join with j +nnoremap j :join +" join up with J +nnoremap J :move .-2 :join + +" split lines with s +nnoremap s i +" split lines up with S +nnoremap S i V:m -2 + +" move screen a line up/down with alt U/D +nmap kzz +nmap jzz + +" spell checking ----------------------------------------------------------------------------------- +set spell spelllang=en + +" set a location +set spellfile=~/.config/nvim/spell/en.utf-8.add + +" go to last or next misspelled word +nnoremap zn ]s +nnoremap zN [s + +" same as above but only with bad words (unrecognized) +nnoremap Zn ]S +nnoremap ZN [S From 7b30f77eccb915a79dd2c6236e828bec52b6eaf8 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 8 Nov 2023 20:43:07 +0100 Subject: [PATCH 6/7] update nvim --- .config/nvim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim b/.config/nvim index 3b4586d..e4841da 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit 3b4586d60019785aa59e0d824a31f283de75d2c3 +Subproject commit e4841da45104ad34fdd967242d11794cf036091d From 81fb6154e2f56aaab320227edff672a001f397e0 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 8 Nov 2023 20:45:41 +0100 Subject: [PATCH 7/7] ideavimrc --- .gitignore | 1 + .ideavimrc | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .ideavimrc diff --git a/.gitignore b/.gitignore index 4a4b2ed..ea7b66e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # except: !.zshrc !.vimrc +!.ideavimrc !.config !.config/nvim !.config/nvim/** diff --git a/.ideavimrc b/.ideavimrc new file mode 100644 index 0000000..82baed7 --- /dev/null +++ b/.ideavimrc @@ -0,0 +1,26 @@ +"" Source your .vimrc +source /home/plex/.vimrc + +"" -- Suggested options -- +" Show a few lines of context around the cursor. Note that this makes the +" text scroll if you mouse-click near the start or end of the window. +set scrolloff=5 + +" Do incremental searching. +set incsearch + +" Do the joining with the ide +set ideajoin + +"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t +"" Map \r to the Reformat Code action +"map \r (ReformatCode) + +"" Map d to start debug +"map d (Debug) + +"" Map \b to toggle the breakpoint on the current line +"map \b (ToggleLineBreakpoint) + + +" Find more examples here: https://jb.gg/share-ideavimrc