This commit is contained in:
jimrothstein 2023-11-03 19:15:47 -07:00
parent 675a09411d
commit c00ae4838d
3 changed files with 40 additions and 0 deletions

View File

@ -176,6 +176,7 @@ require('lazy').setup({
-- this fixes an issue when jumping from neovim to tmux
-- but also means can not easily change pane size, width, height
-- 2023-10-26
-- 2023-10-31 dont' quite undertand behavior, hold off
{
"christoomey/vim-tmux-navigator",
event = "BufReadPre",
@ -333,6 +334,7 @@ vim.o.termguicolors = true
-- Keymaps for better default experience
-- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
vim.keymap.set({ 'n', 'v' }, 'q', '<Nop>', { silent = true })
-- REF: https://nanotipsforvim.prose.sh/keeping-your-register-clean-from-dd
-- if dd action holds content: keep it
@ -369,6 +371,10 @@ vim.api.nvim_create_autocmd('TextYankPost', {
pattern = '*',
}) -- }}}
-- easier, clearer, skeleton file
vim.cmd([[
autocmd BufNewFile *.qmd r ~/.config/kickstart/skeleton/skeleton.qmd
]])
------------------------------------------------------
-- which-key
------------------------------------------------------

26
skeleton/skeleton.R Normal file
View File

@ -0,0 +1,26 @@
# skeleton for *.R
# PURPOSE:
# observeEvent: side effect, print to console
# USAGE:
# interactive
library(shiny)
ui <- fluidPage(
textInput("name", "What's your name?"),
textOutput("greeting")
)
server <- function(input, output, session) {
string <- reactive(paste0("Hello ", input$name, "!"))
output$greeting <- renderText(string())
observeEvent(input$name, {
message("Greeting performed")
})
}
shinyApp(ui, server)
vim:linebreak:nospell:nowrap:cul tw=78 fo=tqlnr foldcolumn=1 cc=+1 filetype=r

8
skeleton/skeleton.qmd Normal file
View File

@ -0,0 +1,8 @@
```{r}
```
vim:linebreak:nospell:nowrap:cul tw=78 fo=tqlnr foldcolumn=1 cc=+1 filetype=r