dev-resources.site
for different kinds of informations.
Create a New Note for Your Obsidian Vault from the Terminal
Published at
10/25/2024
Categories
obsidian
neovim
terminal
productivity
Author
gokayburuc
Author
10 person written this
gokayburuc
open
Hereβs a grammar-checked and slightly expanded version of your text with added clarity:
New Note From Terminal
Create a New Note in Your Obsidian Vault Directly From the Terminal
#obsidian #terminal #vault
To set this up, follow the steps below:
- Open your
.zshrc
file (if you are usingbash
, open.bashrc
instead) to add the following configuration:
nn() {
# Navigate to the programming directory
# WARN: Replace <vaultpath> with the actual path to your vault
cd "$HOME/Documents/vaults/programming/00-inbox/" || return
# Get the current date
current_date=$(date +"%Y-%m-%d")
# Create the filename using the current date and user input
filename="${current_date}_$1.md"
# Create the new note file
touch "$filename"
# FIXME: Enhance this function to add Markdown properties like tags, date, ID, or classes
# Open the newly created file with Neovim
nvim "$filename"
}
What This Script Does
- Automates Note Creation: This function allows you to create new notes in a specified "inbox" folder within your Obsidian vault.
-
Date Prefix: It automatically prefixes the filename with the current date in the
YYYY-MM-DD
format for better organization. - Custom Filenames: You can specify the rest of the filename as a parameter when calling the function.
- Opens in Neovim: After creating the file, it opens it in Neovim for immediate editing.
How to Use It
- Add the above function to your
.zshrc
or.bashrc
file and save it. - Reload your shell configuration with:
source ~/.zshrc # For zsh users
source ~/.bashrc # For bash users
- Create a new note by running:
nn "note-title"
This will create a file named YYYY-MM-DD_note-title.md
in your designated folder.
Next Steps
- Update the script to include Markdown properties like:
- Tags (
#example
) - Date metadata (
date: YYYY-MM-DD
) - Unique identifiers or custom front matter
- Tags (
- Use tools like
echo
orprintf
within the script to populate the file with these properties automatically.
This script makes note-taking more streamlined, especially for Obsidian users managing their notes through the terminal.
neovim Article's
30 articles in total
How to Enable Undercurl in Neovim: Terminal and Tmux Setup Guide
read article
Hassle free flutter Development in Hyprland with Neovim
read article
How to setup VueJs in Neovim (January 2025)
read article
Setting Up NeoVim + LazyVim on My New Mac Mini M4 π»β¨
read article
Zed IDE vs. NeoVim and Other IDEs: The Future of Modern Coding Environments
read article
Enhancing Elixir Development in LazyVim: Quick Documentation Access by Telescope
read article
Lazyvim version 14.x in WSL
read article
From Vi to NeoVim: A Journey into the Heart of Text Editing
read article
As a beginner I use Arch, Neovim and code in assembly btw
read article
How to Setup Vim for Kotlin Development
read article
This developer created a 2K star repo from his phone
read article
Atomic Note-Taking Guide
read article
obsidian neovim markdown
read article
What I've Learned About My Editing Skills
read article
Vim Regex Tricks - Capitalize Every First Letter
read article
Lite π ApolloNvim Distro 2024
read article
[SOLVED] Vue 3 + TypeScript + Inlay Hint support in NeoVim
read article
Migrating from VSCode to Neovim: A Journey of Learning, Confusion, and Triumph! π
read article
Managing LSPs in Neovim: Enable/Disable for the Entire Session
read article
Create a New Note for Your Obsidian Vault from the Terminal
currently reading
Faking the tmux experience on Windows using AutoHotkey
read article
How to resume neovim session
read article
Can't believe I've created 20 vim plugins since 2016
read article
Top 5 Neovim Repositories in this Week
read article
Compile Neovim in Debian/Ubuntu Linux
read article
Neovim for beginners
read article
Make environment to develop commonlisp with NeoVim
read article
Setting up neovim for web development in Golang
read article
Github copilot setup on Austronvim
read article
How I Developed My First Neovim Plugin: A Step-by-Step Guide
read article
Featured ones: