38 lines
1.4 KiB
Lua
38 lines
1.4 KiB
Lua
-- Set <space> as the leader key
|
|
-- See `:help mapleader`
|
|
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
|
vim.g.mapleader = ','
|
|
vim.g.maplocalleader = ','
|
|
|
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
|
vim.g.have_nerd_font = true
|
|
|
|
require 'opt'
|
|
require 'keymap'
|
|
require 'autocmd'
|
|
require 'lazy_init'
|
|
|
|
require('helpers').edit_cf('v', '/init.lua')
|
|
|
|
-- " Auto-Commands --- {{{
|
|
--
|
|
-- augroup modes
|
|
-- autocmd!
|
|
-- autocmd FocusLost * call feedkeys("\<Esc>") "Go to normal mode when moving away
|
|
-- autocmd BufNewFile * call feedkeys("i") "Go to insert mode when starting a new file
|
|
-- augroup END
|
|
--
|
|
-- "Recompile suckless software when updating config
|
|
-- augroup suckless
|
|
-- autocmd BufWritePost ~/.local/src/dwmblocks/config.h !cd ~/.local/src/dwmblocks/; doas make install && { killall -q dwmblocks;setsid -f dwmblocks }
|
|
-- autocmd BufWritePost ~/.local/src/dwm/config.h !cd ~/.local/src/dwm/; doas make clean install
|
|
-- autocmd BufWritePost ~/.local/src/st/config.h !cd ~/.local/src/st/; doas make clean install
|
|
-- " }}}
|
|
--
|
|
-- " Notes and tips
|
|
-- " - press 'zz' to instantly center the line where the cursor is located.
|
|
-- " - You can increment numbers with <c-a>.
|
|
-- " - To operate on multiple lines use <c-v> to select the lines, <c-i> to go to
|
|
-- " insert mode, perform edit, press <esc>.
|
|
-- " - Use the command :r to paste the output of a command to the buffer.
|