nvim remaps
This commit is contained in:
parent
ecb582a1a2
commit
ba9923feac
4
.bashrc
4
.bashrc
|
@ -157,7 +157,7 @@ function paruuu () {
|
|||
&& yes | paru -Syu --devel --noconfirm \
|
||||
&& printf "\033[30;41m%s\033[m\n" "pacman -Qtdq | pacman -Rns -" \
|
||||
&& { pacman -Qtdq | 2>/dev/null sudo pacman --noconfirm -Rns - \
|
||||
|| printf "\033[30;42m%s\033[m\n" "No orphan packages!"; } \
|
||||
|| printf "\033[30;42m%s\033[m\n" "No pacman orphan packages :)!"; } \
|
||||
&& printf "\033[30;42m%s\033[m\n" "###### Done without error ######" \
|
||||
|| printf "\033[30;41m%s\033[m\n" "###### Some error occured! ######"
|
||||
)
|
||||
|
@ -374,7 +374,7 @@ if [ -f "${HOME}"/.userbashrc ]; then . "${HOME}"/.userbashrc; fi
|
|||
alias new_mp_project='clear && builtin cd -P ./ && python3 -m venv ./env/ && . ./env/bin/activate && pip install --no-input opencv-python mediapipe && pip freeze > ./requirements.txt && printf '\''#!/usr/bin/env python3\n\nfrom typing import NoReturn\n\nimport mediapipe as mp\nimport cv2\n\n\ndef main() -> NoReturn:\n\tpass\n\nif __name__ == '\''"'\''"'\''__main__'\''"'\''"'\'':\n\tmain()\n'\'' 1>./main.py && chmod +x ./main.py && printf '\''__pycache__/\nenv/\n'\'' 1>.gitignore && git init && git add -A && git commit -m '\''Initial commit'\'' && git ls-files && echo Done'
|
||||
alias check_for_tabs="clear && 2>/dev/null grep -r ' ' ../ | grep -v pre-rebase | grep -v sendemail | grep -v update.sample | grep -v fsmonitor | grep -v pre-push | grep -v commit-msg | grep -v pre-commit | grep -v push-to- | grep -v pre-receive | grep -v ChangeLog | grep -v '.git/config' | grep -v autogen | grep -v configure.ac | grep -v Makefile | grep -v debian | grep -v lxpolkit-listener | grep -v '.git' | grep -v desktop-files | grep -v autostart.vala | grep -v combobox | grep -v main.vala | grep -v vala | grep -v lxsession-default | grep -v logout | grep -v settings-daemon | grep -v xdg-autostart | grep -v data/images | grep -v compile.sh | grep -v lxsession.xml | grep -v lxsession-utils"
|
||||
# alias lxsession-edit='cd /tmp/lxsession/lxsession-edit && ./compile.sh && 2>/dev/null ./lxsession-edit'
|
||||
function c () {
|
||||
function x () {
|
||||
cc -std=c89 -Wall -Wextra -pedantic -Werror -Wconversion -g -O0 -o main *.c && ./main "${@}"
|
||||
rm -f ./main
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ null_ls.setup({
|
|||
}
|
||||
})
|
||||
|
||||
-- require("norme").setup({
|
||||
-- -- Your configuration
|
||||
-- cmd = os.getenv('HOME') .. '/.local/bin/norminette'
|
||||
-- })
|
||||
require("norme").setup({
|
||||
-- Your configuration
|
||||
cmd = os.getenv('HOME') .. '/.local/bin/norminette'
|
||||
})
|
||||
|
|
|
@ -25,6 +25,7 @@ return require('packer').startup(function(use)
|
|||
use('vim-airline/vim-airline')
|
||||
use('vim-airline/vim-airline-themes')
|
||||
use('cacharle/c_formatter_42.vim')
|
||||
use('m4xshen/autoclose.nvim')
|
||||
use({
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = 'v2.x',
|
||||
|
|
|
@ -25,7 +25,7 @@ vim.keymap.set("n", "<leader>f", function()
|
|||
vim.lsp.buf.format()
|
||||
end)
|
||||
|
||||
-- vims quickfix feature, no idea how it works
|
||||
-- vims quickfix feature, don't need it atm
|
||||
-- vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
|
||||
-- vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
|
||||
-- vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
|
||||
|
@ -33,3 +33,10 @@ end)
|
|||
|
||||
vim.keymap.set("n", "<leader>s", ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>")
|
||||
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>")
|
||||
|
||||
vim.keymap.set("n", "<leader>x", ":w<CR>:!cc -std=c89 -Wall -Wextra -pedantic -Werror -Wconversion -g -O0 -o main *.c && ./main ; rm -f ./main<CR>")
|
||||
|
||||
vim.keymap.set("n", "<leader>c", "mz:s/\\(^\\s*\\)\\(.*$\\)/\\1\\/* \\2 *\\//g<CR>:noh<CR>`z")
|
||||
vim.keymap.set("n", "<leader>C", "mz:s/\\/\\* \\(.*\\) \\*\\//\\1/g<CR>:noh<CR>`z")
|
||||
vim.keymap.set("v", "<leader>c", "mz:s/\\(^\\s*\\)\\(.*$\\)/\\1\\/* \\2 *\\//g<CR>:noh<CR>`z")
|
||||
vim.keymap.set("v", "<leader>C", "mz:s/\\/\\* \\(.*\\) \\*\\//\\1/g<CR>:noh<CR>`z")
|
||||
|
|
|
@ -79,6 +79,11 @@ _G.packer_plugins = {
|
|||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||
},
|
||||
["autoclose.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/autoclose.nvim",
|
||||
url = "https://github.com/m4xshen/autoclose.nvim"
|
||||
},
|
||||
["c_formatter_42.vim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/c_formatter_42.vim",
|
||||
|
|
Loading…
Reference in New Issue