mattn / memo Goto Github PK
View Code? Open in Web Editor NEW๐ Memo Life For You
License: MIT License
๐ Memo Life For You
License: MIT License
First of all, thank you for making this tool available to the public. I notice there is a fuzzy matching interface popping up when typing memo edit
and memo cat
. Does this feature also work for memo delete
as well?
The current syntax of memo delete [pattern]
works fine but always requires me to find its unique pattern first.
ใใใฉใซใใฎใจใใฃใฟใ"vim"ใชใฎใงvimใณใใณใใ็กใ็ฐๅขใงใฏๅฉ็จ้ๅงใ้ฃใใ
cmd.exeใใใณshใใ"vim"ใ่ฆใใชใ็ฐๅข
nvimใemacsใใๅ
ฅใฃใฆใใชใๅ ดๅใชใฉ
ใใใฉใซใใจใใฃใฟใๆๅฎใงใใใใใซใใ
ๅ
ทไฝ็ใซใฏใmemoใณใใณใใฎใชใใทใงใณใงๆๅฎใงใใใใใซใใใ
ใพใๅๅ่ตทๅๆใฏEDITOR็ฐๅขๅคๆฐใ่ชญใใใใซใใใ
ใชใฉใใใใใใงใ
Following makefile targets which use the go get
command to install depedent tools no longer work in current version of Go.
Please allow to configure the memos filename format, and support creation of subdirectories.
For example, create directories for 'year-month/' and filename with 'day-slug.md':
filefmt = "%Y-%m/%d-${SLUG}.md"
๐ฌ Notice the
/
in format.
Example of current default:
filefmt = "%Y-%m-%d-${SLUG}.md"
I keep my memos in this fashion:
โโโ 2016-10
โย ย โโโ 22-ipsum.md
โโโ 2016-12
โย ย โโโ 11-foo-bar.md
โย ย โโโ 13-bar-baz.md
โย ย โโโ 19-lorem.md
โโโ 2017-01
โย ย โโโ 05-foo.md
โโโ index.md
Hello Mattn.
I noticed that in recent versions of Go, the ioutil.ReadFile
function has been deprecated in favor of os.ReadFile
.
As per Go's documentation, many of the functions provided by ioutil
have been moved to other packages (like os
, io
, etc.) to streamline the standard library and make the intention of functions clearer.
Any current usage of ioutil.ReadFile
should be transitioned to os.ReadFile
to stay updated with best practices and avoid potential issues in the future.
Replace all instances of ioutil.ReadFile
with os.ReadFile
.
Thank you for your attention to this matter. I believe making this change will ensure our codebase remains up-to-date with Go's recommended practices.
with following message:
package github.com/urfave/cli/v2: cannot find package "github.com/urfave/cli/v2" in any of:
c:\go\src\github.com\urfave\cli\v2 (from $GOROOT)
C:\Users\user\go\src\github.com\urfave\cli\v2 (from $GOPATH)
Please check and fix it, thank you.
macOS
go version go1.13.4 darwin/amd64
go get -u github.com/mattn/memo
# github.com/mattn/memo
/Users/yy_yank/go/src/github.com/mattn/memo/main.go:108:16: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in array or slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
/Users/yy_yank/go/src/github.com/mattn/memo/main.go:112:18: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
/Users/yy_yank/go/src/github.com/mattn/memo/main.go:148:16: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in array or slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
/Users/yy_yank/go/src/github.com/mattn/memo/main.go:160:18: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
/Users/yy_yank/go/src/github.com/mattn/memo/main.go:295:15: cannot use commands (type []cli.Command) as type []*cli.Command in assignment
I tried to fix.
It seems to solve when modify dependency in Gopkg.toml.
OK:
[[constraint]]
name = "github.com/urfave/cli"
- version = "1.20.0"
+ version = "1.22.1"
NG:
[[constraint]]
name = "github.com/urfave/cli"
- version = "1.20.0"
+ version = "1.22.2"
Current behaviour of memo delete
is a bit confusing: memo d a b c
deletes a, but does not delete b and c.
I'm not sure what should be done when multiple arguments are given. But in my opinion, some warnings should be raised to tell that some arguments are ignored.
I set following config:
memodir = "C:/Users/tsunomur/OneDrive - Microsoft/memo"
editor = "notepad.exe"
column = 20
width = 0
selectcmd = "peco"
grepcmd = "grep -nH ${PATTERN} ${FILES}"
memotemplate = ""
assetsdir = "."
pluginsdir = "C:/Users/tsunomur/AppData/Roaming/memo/plugins"
templatedirfile = ""
templatebodyfile = ""
When I'm trying "memo edit", and after select a file, I got following error(Sorry for only Japanese):
Could you let me know how to write a configuration file to open a file under such a folder?
# I could open when remove call shellquote(file)
but it's not correct solution...
Current implementation doesn't allow using ag.
Change format of grepcmd using placeholder like below.
ag ${PATTERN} ${DIR}
or
ag ${PATTERN} ${FILES}
Nice program! I'm on Ubuntu Linux 14.04 -- what is equivalent of peco so I can edit my memo?
Also, is there a way to more simply show the complete memo?
In other words, I create the memo with vim, but it would be nice to have something like this:
memo new
debug
vim edit file and add several lines about debug, then save file.
memo show debug (which would basically cat my vim created file relating to debug)
memo g
command causes a loop of displaying results when grepcmd
is set as below.
grepcmd = "powershell Select-String -Pattern ${PATTERN} -Path ${DIR}/*.md"
On line 720 of main.go
, func cmdGrep
has a if
block for Windows environment and it seems to be the cause. I don't know why the block is there but I imagine that it's necessary workaround when grep
is used on cmd.exe
.
Actually, I'm not using grep
despite the name of config so that it is very understandable if this issue is regarded as inappropriate. However I would be happy if I can use Select-String
here because powershell commands are available on Windows 10/11 by default.
Is there any good way to support both grep
and Select-String
?
It would be nice to have GitHub like markdown output when using server mode.
It would be nice if you can view the memo rather having to go and edit it to see the conten, or that feature is there already.
Please allow ${HOME}
, ${XDG_CONFIG_HOME}
, and/or ~
in memo's config to specify memodir
. For example:
memodir = "${XDG_CONFIG_HOME}/memo/_posts"
memodir = "${HOME}/.config/memo/_posts"
memodir = "~/.config/memo/_posts"
anatol@anatol-CT15:~$ go version
go version go1.6.2 linux/amd64
anatol@anatol-CT15:~$ export GOPATH=~/.go
anatol@anatol-CT15:~$ go get github.com/mattn/memo
# github.com/shurcooL/github_flavored_markdown/gfmstyle
.go/src/github.com/shurcooL/github_flavored_markdown/gfmstyle/assets_vfsdata.go:136: undefined: io.SeekStart
.go/src/github.com/shurcooL/github_flavored_markdown/gfmstyle/assets_vfsdata.go:138: undefined: io.SeekCurrent
.go/src/github.com/shurcooL/github_flavored_markdown/gfmstyle/assets_vfsdata.go:140: undefined: io.SeekEnd
.go/src/github.com/shurcooL/github_flavored_markdown/gfmstyle/assets_vfsdata.go:181: undefined: io.SeekStart
anatol@anatol-CT15:~$ ls .go
pkg src
It would be nice if you can view memo and rename.
Thank you for your great works! ๐
create text file
create only markdown file
create favarite file type
createfiletype = 'txt' # enable to create text file
listfiletype = ' * ' # enable to list cmd for every file type
editfiletype = ' * ' # enable to edit cmd for every file type
memo g leaves me only with a list
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.