mirror of
https://github.com/tomru/vim.git
synced 2026-03-03 06:27:18 +01:00
couple updates 🤷
This commit is contained in:
@@ -4,6 +4,9 @@ vim.keymap.set('t', 'jk', [[<C-\><C-n>]])
|
||||
-- quick write
|
||||
vim.keymap.set('n', '<leader>w', vim.cmd.w)
|
||||
|
||||
-- quick config
|
||||
vim.keymap.set('n', '<leader>C', '<Cmd>e $MYVIMRC<CR>', { desc = '[C]onfig' })
|
||||
|
||||
-- quick source file
|
||||
vim.keymap.set('n', '<leader>x', "<Cmd>source %|echo expand('%') 'sourced'<CR>")
|
||||
|
||||
|
||||
@@ -62,6 +62,25 @@ local snippets = {
|
||||
),
|
||||
},
|
||||
javascript = {
|
||||
s(
|
||||
{ trig = 'rfc', name = 'React Fuctional Component' },
|
||||
fmt(
|
||||
[[
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const {} = function({}) {{
|
||||
return {};
|
||||
}};
|
||||
|
||||
{}.propTypes = {{
|
||||
{}
|
||||
}};
|
||||
|
||||
export default {};
|
||||
]],
|
||||
{ i(1, 'ComponentName'), i(2, '{}'), i(0), rep(1), i(3), rep(1) }
|
||||
)
|
||||
),
|
||||
s(
|
||||
{ trig = 'des', name = 'describe' },
|
||||
fmt(
|
||||
|
||||
Reference in New Issue
Block a user