* highlighter: Fix regions and patterns inside regions
* highlighting: Remove 2nd recursive highlightRegion() call
...and add limitGroup checks to pattern search.
* yaml: Add TODO type highlighting
* highlighting: Don't stop in highlightRegion() at empty lines
...because possible region line end pattern must be detected.
* syntax/sh: Correct string handling due to additional pattern handling
* syntax/sh: Remove slash in variables
* highlighter: Accept nested region only in case it's within the current reagion
* highlighter: Accept nested patterns only in case it's within the current reagion
* highlighter: Don't search for nesting in case the region end was found at start
Build pipelines for the Jenkins build system are configured in Groovy,
however since their filename is always `Jenkinsfile`, micro doesn't
recognize them as Groovy, and doesn't add syntax highlighting.
This small commit simply adds `Jenkinsfile` and `jenkinsfile` as file
names recognized as Groovy.
Add HistorySearchUp and HistorySearchDown actions which are similar to
HistoryUp and HistoryDown but search for the prev/next history item
whose beginning matches the currently entered text in the infobuffer
(more precisely, the text before cursor).
Also fixed the following issue: if we scrolled to an older history item
and then edit the infobuffer, this older item gets modified.
We should not edit old history entries. So in this case set HistoryNum
to the last (newly added) item and modify the last item.
* highlighter: Fix region & pattern detection
* syntax/sh: Highlight upper case options too
* syntax/c(pp): Try to synchronize the rules to lower the maintenance effort
* syntax/ruby: Fix explicit filename detection in directories
* highlighter: Respect skip rules in regions
* syntax/sh: Fix parameter expansion, cond. flags and generalize filename via ""
* syntax/php|vi: Correct strings in comments to comments only
Additionally improve vimscript comment handling.
* highlighter: Remove problematic start|end check in find(all)Index()
...and additionally remove recursive region end detection
On modern Linux systems, it can take 30 seconds for
the data to actually hit the disk (check
/proc/sys/vm/dirty_expire_centisecs).
If the computer crashes in those 30 seconds, the user
may end up with an empty file as seen here:
https://github.com/neovim/neovim/issues/9888
This is why editors like vim and nano call
the fsync syscall after they wrote the file.
This syscall is available as file.Sync() in Go.
Running strace against micro shows that fsync is
called as expected:
$ strace -f -p $(pgrep micro) -e fsync
strace: Process 3284344 attached with 9 threads
[pid 3284351] fsync(8) = 0
Also, we now catch errors returned from w.Flush().
* Comment fix & gofmt fix
* Goto next/previous diff commands
These commands will work in `git` repositories or whenever `set diff on` is
working. They are bound to `Alt-[` and `Alt-]` by default. I would prefer
`Alt-Up` and `Alt-Down`, but that's already taken.
There are no tests at the moment; I'm looking into writing some since that will
be needed for the rest of the plan to make
https://github.com/zyedidia/micro/discussions/2753 a reality. I'm not sure how
difficult that will be.
* Realign JSON in keybindings.md
* Add <content_rating> to appdata file
* Add <project_license> to appdata file
* Change application_id to use github.io instead of github.com
Github actually gives username.github.io domains and not username.github.com,
therefore it is more correct to use .io top level domain.
We can use <provides><id>...</id></provides> for everyone who expected
the old application_id
Bump zyedidia/terminal, which is the actual dependency. We can get the
information we need from the Term's pty file rather than using a buffer
connected to stdout.
Fixes#2775
Add color groups for displaying statuslines of inactive split panes
and the suggestions menu with colors different from the statusline
of the active pane.
* Update for fixing bug issue
Adds YNprompt when user tries save new file as existing file name in current directory.
https://github.com/zyedidia/micro/issues/2709
* Update actions.go
error handled. gonna have to be tested on permission errors, etc
There is already a commented-out code in main() for enabling CPU
profiling of micro, which is often useful. Adjust it to allow enabling
it just by providing -profile flag on the command line, without
modifying and recompiling the code.