implement 'cmd-word' and 'cmd-word-back' commands

Related #67
This commit is contained in:
Gokcehan committed 2018-05-05 19:37:14 +03:00
1 parent 7543b2256c
commit ef709b5611
5 files changed
+31 -1

No files matched your search

+3
View File
@@ -195,6 +195,9 @@ func naturalLess(s1, s2 string) bool {
return len(parts1) < len(parts2)
}
var reWordBeg = regexp.MustCompile(`([^\pL\pN]|^)(\pL|\pN)`)
var reWordEnd = regexp.MustCompile(`(\pL|\pN)([^\pL\pN]|$)`)
func min(a, b int) int {
if a < b {
return a