refactor nvim lua
This commit is contained in:
parent
bad3465e65
commit
a5e31ca2b4
@ -82,9 +82,6 @@ alias ve='python3 -m virtualenv venv && . venv/bin/activate'
|
|||||||
alias vd='deactivate'
|
alias vd='deactivate'
|
||||||
|
|
||||||
|
|
||||||
# docker
|
|
||||||
alias drma='docker rm $(docker ps -a -q -f status=exited)'
|
|
||||||
|
|
||||||
# python
|
# python
|
||||||
alias pipir='python3 -m pip install -r requirements.txt'
|
alias pipir='python3 -m pip install -r requirements.txt'
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,6 @@ map('n', '<Leader>/',
|
|||||||
opts)
|
opts)
|
||||||
|
|
||||||
map('i', 'jk', '<ESC>', opts)
|
map('i', 'jk', '<ESC>', opts)
|
||||||
map('i', 'ол', '<ESC>', opts)
|
|
||||||
|
|
||||||
map('n', '<Enter>', 'o<ESC>', opts)
|
map('n', '<Enter>', 'o<ESC>', opts)
|
||||||
map('n', '<Space>', 'O<ESC>', opts)
|
map('n', '<Space>', 'O<ESC>', opts)
|
||||||
|
|||||||
@ -29,8 +29,8 @@ local function set_keymap_run_script(cmd)
|
|||||||
set_keymap_run_script_base("r", cmd)
|
set_keymap_run_script_base("r", cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function set_keymap_run_script_by_shebang(cmd)
|
local function set_keymap_run_script_by_shebang()
|
||||||
set_keymap_run_script_base("s", cmd)
|
set_keymap_run_script_base("s", [[$(head -1 % | cut -c 3-) %]])
|
||||||
end
|
end
|
||||||
|
|
||||||
local function create_function_autocmd_by_filetype(set_keymap_func, ft, cmd)
|
local function create_function_autocmd_by_filetype(set_keymap_func, ft, cmd)
|
||||||
@ -68,4 +68,4 @@ autocmd(create_function_autocmd_by_filename(set_keymap_run_script, 'manpage', 'm
|
|||||||
autocmd_format_file_by_filetype('rust', 'cargo fmt -p')
|
autocmd_format_file_by_filetype('rust', 'cargo fmt -p')
|
||||||
autocmd_format_file_by_filetype('go', 'go fmt')
|
autocmd_format_file_by_filetype('go', 'go fmt')
|
||||||
|
|
||||||
autocmd(function() set_keymap_run_script_by_shebang([[$(head -1 % | cut -c 3-) %]]) end)
|
autocmd(set_keymap_run_script_by_shebang)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user