aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nvim/.config/nvim/lua/config/keymaps.lua24
-rwxr-xr-xscripts/.scripts/youtube.sh6
-rw-r--r--vim/.vimrc54
-rw-r--r--zsh/.zshrc3
4 files changed, 84 insertions, 3 deletions
diff --git a/nvim/.config/nvim/lua/config/keymaps.lua b/nvim/.config/nvim/lua/config/keymaps.lua
index 4ee8714..c84bef7 100644
--- a/nvim/.config/nvim/lua/config/keymaps.lua
+++ b/nvim/.config/nvim/lua/config/keymaps.lua
@@ -19,6 +19,30 @@ end
map("v", "<S-j>", ":m '>+1<CR>gv=gv", { desc = "Move down" })
map("v", "<S-k>", ":m '<-2<CR>gv=gv", { desc = "Move up" })
+-- fix annoying typs when saving or quitting
+vim.cmd([[
+ cnoreabbrev W! w!
+ cnoreabbrev W1 w!
+ cnoreabbrev w1 w!
+ cnoreabbrev Q! q!
+ cnoreabbrev Q1 q!
+ cnoreabbrev q1 q!
+ cnoreabbrev Qa! qa!
+ cnoreabbrev Qall! qall!
+ cnoreabbrev Wa wa
+ cnoreabbrev Wq wq
+ cnoreabbrev wQ wq
+ cnoreabbrev WQ wq
+ cnoreabbrev wq1 wq!
+ cnoreabbrev Wq1 wq!
+ cnoreabbrev wQ1 wq!
+ cnoreabbrev WQ1 wq!
+ cnoreabbrev W w
+ cnoreabbrev Q q
+ cnoreabbrev Qa qa
+ cnoreabbrev Qall qall
+]])
+
map("n", "<leader>h", "<Cmd>noh<CR>", { desc = "remove highlights", remap = true })
map("n", "<leader>j", "/<()><CR>ciw<CR><C-o>O", { desc = "jump to <()>", remap = true })
map("n", "<leader>c", "<Cmd>bd<CR>", { desc = "Close current buffer", remap = true })
diff --git a/scripts/.scripts/youtube.sh b/scripts/.scripts/youtube.sh
index 43921b3..6bae0f7 100755
--- a/scripts/.scripts/youtube.sh
+++ b/scripts/.scripts/youtube.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-youtube_link=$(: | dmenu -p "Youtube link: ")
-quality=$(echo -e "1080p\n720p\n480p\n360p" | dmenu -i -l 4)
+youtube_link=$(xclip -o)
+# quality=$(echo -e "1080p\n720p\n480p\n360p" | dmenu -i -l 4)
-mpv --profile="$quality" "$youtube_link" 2>/dev/null
+mpv --profile="720p" "$youtube_link" 2>/dev/null
diff --git a/vim/.vimrc b/vim/.vimrc
new file mode 100644
index 0000000..1b67dc7
--- /dev/null
+++ b/vim/.vimrc
@@ -0,0 +1,54 @@
+" You want Vim, not vi. When Vim finds a vimrc, 'nocompatible' is set anyway.
+" We set it explicitely to make our position clear!
+
+set background=dark
+colorscheme rosepine
+
+let g:disable_bg = 1
+
+set nocompatible
+
+filetype plugin indent on " Load plugins according to detected filetype.
+syntax on " Enable syntax highlighting.
+
+set autoindent " Indent according to previous line.
+set expandtab " Use spaces instead of tabs.
+set softtabstop =2 " Tab key indents by 4 spaces.
+set shiftwidth =2 " >> indents by 4 spaces.
+set shiftround " >> indents to next multiple of 'shiftwidth'.
+
+set backspace =indent,eol,start " Make backspace work as you would expect.
+set hidden " Switch between buffers without having to save first.
+set laststatus =2 " Always show statusline.
+set display =lastline " Show as much as possible of the last line.
+set number
+set relativenumber
+
+set showmode " Show current mode in command-line.
+set showcmd " Show already typed keys when more are expected.
+
+set incsearch " Highlight while searching with / or ?.
+
+set ttyfast " Faster redrawing.
+set lazyredraw " Only redraw when necessary.
+
+set splitbelow " Open new windows below the current window.
+set splitright " Open new windows right of the current window.
+
+set wrapscan " Searches wrap around end-of-file.
+set report =0 " Always report changed lines.
+set synmaxcol =200 " Only highlight the first 200 columns.
+
+set list " Show non-printable characters.
+if has('multi_byte') && &encoding ==# 'utf-8'
+ let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±'
+else
+ let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.'
+endif
+
+" The fish shell is not very compatible to other shells and unexpectedly
+" breaks things that use 'shell'.
+if &shell =~# 'fish$'
+ set shell=/bin/bash
+endif
+
diff --git a/zsh/.zshrc b/zsh/.zshrc
index aa99ba4..8b9c6ea 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -18,6 +18,9 @@ DISABLE_MAGIC_FUNCTIONS=true
# Use bat as the default manpager
# export MANPAGER="sh -c 'col -bx | bat -l man -p'"
+# export MANPAGER="bat -l man"
+# export MANPAGER="nvim -c 'set ft=man' -"
+# export MANPAGER="most"
# Uncomment the following line to disable auto-setting terminal title.
DISABLE_AUTO_TITLE="true"