samhstn / m

A zsh command line utility when using your terminal and vim as your ide.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

m

A zsh command line tool to help with using your terminal and vim as your ide.

# open a file for editing
$ m <filename>

# find a pattern in a project
$ mg <search pattern>

# find a file in a project
$ mf <file pattern>

# open a search result from the above 2 commands
$ mo <n>

# open the most recently viewed file
$ mr

# run m on the last command args
$ ml

Requirements

deno

nvim

rg

fd

Set up

# clone the repo
git clone git@github.com:samhstn/m.git && cd m

# set up the archive
mkdir -p $HOME/.m-archive
echo '[]' > $HOME/.m-archive/mr.json
echo '[]' > $HOME/.m-archive/mo.json

# add an `M_PATH` environment var to your `.zshrc`
echo "export M_PATH=$HOME/Projects/m" >> ~/.zshrc

# add tool to your .zshrc so it runs on start up
echo "source $(pwd)/m.zsh" >> ~/.zshrc
source ~/.zshrc

About

A zsh command line utility when using your terminal and vim as your ide.


Languages

Language:TypeScript 80.0%Language:Shell 20.0%