Skip to content

How to open neovim in org capture? #845

Answered by kristijanhusak
aareman asked this question in Q&A
Discussion options

You must be logged in to vote

I actually added this for me recently since I needed to capture some stuff on the fly.
I have 2 things:

  1. A shell script that I put in the /usr/local/bin with this content:
#!/bin/sh

kitty nvim -c "autocmd BufEnter * only" -c "lua require('orgmode').capture:open_template_by_shortcut('t')"

It opens up kitty terminal window, starts nvim and selects a default capture template by my choice. Then I run this with rofi when needed. Once the capture is finished it closes everything out.

  1. A zsh function that I can execute from the terminal:
nt() {
  nvim -c "autocmd BufEnter * only" -c "lua require('orgmode').capture:open_template_by_shortcut('t')"
}

If i'm in the terminal and I need to do somet…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aareman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants