package
2.0.14
Repository: https://github.com/zyedidia/micro.git
Documentation: pkg.go.dev

# Functions

Abs is a simple absolute value function for ints.
CharacterCount returns the number of characters in a byte array Similar to utf8.RuneCount but for unicode characters.
CharacterCount returns the number of characters in a string Similar to utf8.RuneCountInString but for unicode characters.
Clamp clamps a value between min and max.
DecodeCharacter returns the next character from an array of bytes A character is a rune along with any accompanying combining runes.
DecodeCharacterInString returns the next character from a string A character is a rune along with any accompanying combining runes.
EscapePath replaces every path separator in a given path with a %.
FSize gets the size of a file.
GetCharPosInLine gets the char position of a visual x y coordinate (this is necessary because tabs are 1 char but 4 visual spaces).
GetLeadingWhitespace returns the leading whitespace of the given byte array.
GetMemStats returns a string describing the memory usage and gc time used so far.
GetModTime returns the last modification time for a given file.
GetPathAndCursorPosition returns a filename without everything following a `:` This is used for opening files like util.go:10:5 to specify a line and column Special cases like Windows Absolute path (C:\myfile.txt:10:5) are handled correctly.
GetTrailingWhitespace returns the trailing whitespace of the given byte array.
HasTrailingWhitespace returns true if the given byte array ends with a whitespace.
HttpRequest returns a new http.Client for making custom requests (for lua plugins).
IntOpt turns a float64 setting to an int.
IsAlphanumeric returns whether or not a rune is an 'alphanumeric character' Alphanumeric characters are defined as numbers or letters.
IsAutocomplete returns whether a character should begin an autocompletion.
IsBytesWhitespace returns true if the given bytes are all whitespace.
IsLowerAlphanumeric returns whether or not a rune is a 'lower alphanumeric character' Lower alphanumeric characters are defined as numbers or lower-case letters.
IsLowerLetter returns whether or not a rune is a 'lower letter character' Lower letter characters are defined as lower-case letters.
IsLowerWordChar returns whether or not a rune is a 'lower word character' Lower word characters are defined as numbers, lower-case letters or sub-word delimiters.
IsNonWordChar returns whether or not a rune is not a 'word character' Non word characters are defined as all characters not being numbers, letters or sub-word delimiters See IsWordChar().
IsSpaces checks if a given string is only spaces.
IsSpacesOrTabs checks if a given string contains only spaces and tabs.
IsSubwordDelimiter returns whether or not a rune is a 'sub-word delimiter character' i.e.
IsUpperAlphanumeric returns whether or not a rune is an 'upper alphanumeric character' Upper alphanumeric characters are defined as numbers or upper-case letters.
IsUpperLetter returns whether or not a rune is an 'upper letter character' Upper letter characters are defined as upper-case letters.
IsUpperWordChar returns whether or not a rune is an 'upper word character' Upper word characters are defined as numbers, upper-case letters or sub-word delimiters.
IsWhitespace returns true if the given rune is a space, tab, or newline.
IsWordChar returns whether or not a rune is a 'word character' Word characters are defined as numbers, letters or sub-word delimiters.
LuaGetLeadingWhitespace returns the leading whitespace of a string (used by lua plugins).
LuaIsWordChar returns true if the first rune in a string is a word character.
LuaRuneAt is a helper function for lua plugins to return the rune at an index within a string.
MakeRelative will attempt to make a relative path between path and base.
Max takes the max of two ints.
Min takes the min of two ints.
ParseBool is almost exactly like strconv.ParseBool, except it also accepts 'on' and 'off' as 'true' and 'false' respectively.
ParseSpecial replaces escaped ts with '\t'.
ReplaceHome takes a path as input and replaces ~ at the start of the path with the user's home directory.
RunePos returns the rune index of a given byte index Make sure the byte index is not between code points.
SliceEnd returns a byte slice where the index is a rune index Slices off the start of the slice.
SliceEndStr is the same as SliceEnd but for strings.
SliceStart returns a byte slice where the index is a rune index Slices off the end of the slice.
SliceStartStr is the same as SliceStart but for strings.
SliceVisualEnd will take a byte slice and slice off the start up to a given visual index.
Spaces returns a string with n spaces.
String converts a byte array to a string (for lua plugins).
StringWidth returns the visual width of a byte array indexed from 0 to n (rune index) with a given tabsize.
No description provided by the author
No description provided by the author
Unzip unzips a file to given folder.

# Variables

CommitHash is the commit this version was built on.
CompileDate is the date this binary was compiled on.
Debug logging.
FakeCursor is used to disable the terminal cursor and have micro draw its own (enabled for windows consoles where the cursor is slow).
SemVersion is the Semantic version.
Sigterm is a channel where micro exits when written.
Stdout is a buffer that is written to stdout when micro closes.
Version is the version number or commit hash.