Documentation
¶
Index ¶
Constants ¶
View Source
const About = `# **Bard help**
So Bard is vim-like TUI text editor, so if you know some vim motions you'll be fine
Anyways, there are some modes available:
- ***NORMAL*** - main mode where you can move around and do some stuff
- ***INSERT*** - this is where you insert text
- ***COMMAND*** - mode for command execution, like *:wq*
- ***VISUAL*** / ***VISUAL-LINE*** - modes for text selection
When you run bart you start in *NORMAL* mode, and in any other mode you can press *ESC* to get back to here
For more information run ` + "`" + `:h[elp] <topic>` + "`" + `, for example ` + "`" + `:h command` + "`" + ` to get list of available command in ***Command*** mode
List of all topics:
- 'about' (you are here)
- 'modes'
- 'normal'
- 'insert'
- 'command'
- 'visual' and 'visual-line'
- 'explorer'
- 'config'
- 'theme'
- 'space'
Anyways, here is some main vim keys.
You can also find more information about some specific mode by running *:help <mode>*
## **Main keys**
### **Movement**
just like in vim:
- ` + "`" + `h` + "`" + ` - move left
- ` + "`" + `j` + "`" + ` - move down
- ` + "`" + `k` + "`" + ` - move up
- ` + "`" + `l` + "`" + ` - move right
You can also type something like *12k* to move 12 lines up
Then you have:
- ` + "`" + `G` + "`" + `- Move to the last line of the file
- ` + "`" + `gg` + "`" + ` - Move to the first line of the file
### **Commands**:
- ` + "`" + `:q` + "`" + ` - quit
- ` + "`" + `:w` + "`" + ` - save (write)
- ` + "`" + `:x` + "`" + ` / ` + "`" + `:wq` + "`" + ` - quit and save (write)
- ` + "`" + ":gt [<id>]" + "`" + ` - move to next tab, or tab with given <id>
- ` + "`" + ":gT" + "`" + ` - move to previous tab
### **How do you type?**
You can type in *INSERT* mode. Here is how you can enter it:
- ` + "`" + `i` + "`" + ` - set mode to ***INSERT*** before the cursor
- ` + "`" + `a` + "`" + ` - set mode to ***INSERT*** after the cursor
- ` + "`" + `I` + "`" + ` - set mode to ***INSERT*** at the first char of the line
- ` + "`" + `A` + "`" + ` - set mode to ***INSERT*** at the end of the line
And here is some helpful vim motions:
- ` + "`" + `o` + "`" + ` - make a new line below and set mode to ***INSERT***
- ` + "`" + `O` + "`" + ` - make a new line above and set mode to ***INSERT***
`
View Source
const Command = `` /* 1242-byte string literal not displayed */
View Source
const Config = `# **Config**
Config is located at ` + "`~/.bard/config.json`" + ` file. You can edit it manually, or with commands inside bard
Default config looks like this:
` + "```json" + `
{
` + "\t" + `theme_name: "bard.json" ` + " " + `# Used to set theme. This field is required '.josn' at the end. All themes is stored at '~/.bard/themes' directory.
` + "\t" + `tab_stop: 4 ` + " " + `# Can't be less thant 1. Used to set max tab width.
` + "\t" + `resize_time_duration: 200 ` + " " + `# Time in milliceconds. Used to set timer to handle terminal resize. Can't be less than 200 and greater than 1000 milliseconds
` + "\t" + `relative_line_number: false ` + " " + `# Used to turn on or off relative line numeration.
` + "\t" + `show_markdown_symbols: false ` + "" + `# If true - always show markdonw symbols (like starts or underlines). By default they are hidden.
` + "\t" + `show_empty_line_symbol: true ` + "" + `# Turns on and off empty line symbol '~'. In read only buffers is off by default.
` + "\t" + `enable_render: true ` + " " + `# Turns render on and off.
` + "\t" + `show_tab_names: true ` + " " + `# Used to toggle tabs information in status bar. true: [1|filename], false: [1].
` + "\t" + `keep_tabs: true ` + " " + `# True by default. If false - replaces inserted tabs with spaces. Doesn't replace tabs in opened file.
` + "\t" + `show_icons: true` + " " + `# Used in render do decide should it draw nerdfont icons or not.
` + "\t" + `show_borders: true` + " " + `# Turns on and off tile borders.
` + "\t" + `show_dot_files: true` + " " + `# Used in explorer to show or hide hidden (dot) files.
}
` + "```" + `
`
View Source
const Explorer = `# **Explorer**
To open file explorer press ` + "`<ctrl+j>`" + `. This button combination also hides it if it's already opened.
You can change focused tile without hiding file explorer with ` + "`<ctrl+o>`" + `.
## List of keys:
- ` + "`<esc>`" + ` - switch focus to the editor tile
- ` + "`k`" + ` - move cursor up
- ` + "`j`" + ` - move cursor down
- ` + "`<enter>`" + ` - open file or change directory
- ` + "`d`" + ` - delete file. You must confirm this by pressing ` + "`<enter>` / `y/Y`" + `. Or press ` + "`<esc>` / `n/N`" + ` to cancel
- ` + "`o`" + ` - create a new file or dir. Press ` + "`/`" + ` to change type, ` + "`<enter>`" + ` to create or ` + "`<esc>`" + ` to cancel
- ` + "`g/G`" + ` - move to the top/bottom of the files
- ` + "`r`" + ` - rename file
- ` + "`s`" + ` - clear file name and rename it
- ` + "`/`" + ` - enable search. Press ` + "`<esc>` or <enter>" + ` to exit. If you not searching, you can press ` + "`<esc>`" + ` one more time to clear search bar
`
View Source
const Modes = `# Supported Modes:
Now Bard supports next vim modes:
- ***normal*** mode - main mode where you can move around
- ***insert*** mode - here you can type (not described in help yet)
- ***command*** mode - used for running some commands
- ***visual*** and ***visual-line*** modes - used for text selection
- ***replace*** mode - used for char replacement (not described in help yet)
For more information type ` + "`" + ":h[elp] <mode>" + "`"
View Source
const Normal = `` /* 1082-byte string literal not displayed */
View Source
const Space = `# Space
Space is a personal space of yours.
You can open space by running Bard with ` + "`-s` or `--space`" + ` flag.
Space is located at ` + "`~/.bard/space`" + ` directory, and all files stores as simple markdown files.
`
View Source
const Theme = `# Theme
Theme contains 3 parts:
1. General - used across the Bard
2. Markdown - used in markdown render
3. Code - used in code render
In each of theme you can provide ASCII escape sequance with color and text type.
For example you can make bold red numbers with ` + "`\\033[1;31m`" + `
To change theme, you can run ` + "`:theme <name>.json`" + ` in bard, or change it in config
You can also get current theme name by running ` + "`:theme`" + ` command
`
View Source
const Visual = `` /* 581-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.