Add nvim comment plug-in, configure F5 for Python execution, and stopwatch for zsh.

main
felixm 2024-01-01 11:17:05 -05:00
parent 4ec53a64aa
commit 87bf29a062
5 changed files with 37 additions and 8 deletions

View File

@ -27,4 +27,5 @@ vim.api.nvim_set_keymap('n', '<C-c>', '"+yy', {noremap = true, silent = true})
vim.api.nvim_set_keymap('v', '<C-c>', '"+y', {noremap = true, silent = true})
vim.api.nvim_set_keymap('i', '<C-v>', '<Esc>"+pa', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<C-S-v>', '"+p', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<f5>', ':belowright split | terminal python %<cr>', {noremap = true, silent = true})

View File

@ -20,6 +20,13 @@ return require('packer').startup(function(use)
vim.o.timeoutlen = 300
end
}
use {
'numToStr/Comment.nvim',
config = function()
require('Comment').setup()
end
}
use {
'stevearc/oil.nvim',

View File

@ -49,8 +49,8 @@ local function save_profiles(threshold)
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/felixm/.cache/nvim/packer_hererocks/2.1.1697887905/share/lua/5.1/?.lua;/home/felixm/.cache/nvim/packer_hererocks/2.1.1697887905/share/lua/5.1/?/init.lua;/home/felixm/.cache/nvim/packer_hererocks/2.1.1697887905/lib/luarocks/rocks-5.1/?.lua;/home/felixm/.cache/nvim/packer_hererocks/2.1.1697887905/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/felixm/.cache/nvim/packer_hererocks/2.1.1697887905/lib/lua/5.1/?.so"
local package_path_str = "/home/felixm/.cache/nvim/packer_hererocks/2.1.1700008891/share/lua/5.1/?.lua;/home/felixm/.cache/nvim/packer_hererocks/2.1.1700008891/share/lua/5.1/?/init.lua;/home/felixm/.cache/nvim/packer_hererocks/2.1.1700008891/lib/luarocks/rocks-5.1/?.lua;/home/felixm/.cache/nvim/packer_hererocks/2.1.1700008891/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/felixm/.cache/nvim/packer_hererocks/2.1.1700008891/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
@ -74,6 +74,12 @@ end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["Comment.nvim"] = {
config = { "\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0" },
loaded = true,
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/Comment.nvim",
url = "https://github.com/numToStr/Comment.nvim"
},
["lualine.nvim"] = {
loaded = true,
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/lualine.nvim",
@ -134,14 +140,18 @@ _G.packer_plugins = {
}
time([[Defining packer_plugins]], false)
-- Config for: oil.nvim
time([[Config for oil.nvim]], true)
try_loadstring("\27LJ\2\n1\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\boil\frequire\0", "config", "oil.nvim")
time([[Config for oil.nvim]], false)
-- Config for: which-key.nvim
time([[Config for which-key.nvim]], true)
try_loadstring("\27LJ\2\nD\0\0\2\0\4\0\t6\0\0\0009\0\1\0+\1\2\0=\1\2\0006\0\0\0009\0\1\0)\1,\1=\1\3\0K\0\1\0\15timeoutlen\ftimeout\6o\bvim\0", "config", "which-key.nvim")
time([[Config for which-key.nvim]], false)
-- Config for: Comment.nvim
time([[Config for Comment.nvim]], true)
try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim")
time([[Config for Comment.nvim]], false)
-- Config for: oil.nvim
time([[Config for oil.nvim]], true)
try_loadstring("\27LJ\2\n1\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\boil\frequire\0", "config", "oil.nvim")
time([[Config for oil.nvim]], false)
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then

View File

@ -193,8 +193,8 @@ endfunc
augroup filetype_python
autocmd!
" autocmd FileType python packadd custom-python
autocmd FileType python inoremap <buffer> F5 <esc>:w<CR>:!python3 "%:p"<CR>
autocmd FileType python nnoremap <buffer> F5 :w<CR>:!python3 "%:p"<CR>
autocmd FileType python inoremap <buffer> <F5> <esc>:w<CR>:!pypy3 "%:p"<CR>
autocmd FileType python nnoremap <buffer> <F5> :w<CR>:!pypy3 "%:p"<CR>
augroup END
" }}}
" Filetype javascript {{{

View File

@ -41,6 +41,17 @@ countdown() {
mpv ~/syn/xmd/bell.mp3 --really-quiet
}
stopwatch() {
local start_time=$(date +%s)
echo "Stopwatch started. Press Ctrl+C to stop."
while true; do
local current_time=$(date +%s)
local elapsed_time=$((current_time - start_time))
printf "\rElapsed time: %02d:%02d:%02d" $((elapsed_time/3600)) $((elapsed_time%3600/60)) $((elapsed_time%60))
sleep 1
done
}
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"