This example puts the Table of Contents in the Sidebar. The sidebar
is locked in place as you scroll up and down. Just paste the following in
your page.
You can view this repo locally with the following command (I’m assuming you’ve
already installed jekyll and cloned this repo.
jekyll serve --trace
You may get an error similar to the following:
/usr/lib/ruby/2.7.0/bundler/runtime.rb:312:in `check_for_activated_spec!': You
have already activated rouge 3.20.0, but your Gemfile requires rouge 3.19.0.
Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
This means the gem.lock file is out of date. To fix run the following
command. You may have to iterate multiple times if more than one gem is
out of date.
bundle update rouge
Please send me a pull request with your fix.
Lorem Ipsum
You can ignore the following documentation. I’m using the
Lued Text Editor
documentation as Lorem Ipsum.
Key bindings are defined in lued/lua_src/bindings/lued_bindings.lua.
This is fairly straight-forward, easily understandable Lua code. You are
encouraged to modify the bindings to suite your style. You don’t Lua
knowledge to figure out what to do.
Basic Control Key Commands
Ctrl+@
Called when resuming from Ctrl+Z (fg at shell prompt). Not directly used by you.
Ctrl+Q
Quit or Exit. Similar to Sublime Ctrl-Q.
Ctrl+W
Close window or tab. Similar to Sublime Ctrl-W.
Ctrl+E
Move to End of Line. Similar to Sublime <End>.
Ctrl+R
Move right defined number (4) of char
Ctrl+T
Select file tab menu
Ctrl+Y
Redo (undo undo). Similar to Sublime Ctrl+Y
Ctrl+U
Spare
Ctrl+I
Terminal interprets as `Tab` key
Ctrl+O
Open File. Similar to Word Ctrl+O
Ctrl+P
Open File from partial name. Similar to Sublime Ctrl+P
Ctrl+A
Move to Start of Line. Similar to Sublime <Home>.
Ctrl+S
Save File. Similar to Sublime Ctrl+S.
Ctrl+D
Select Word under cursor. Similar to Sublime Ctrl+D
Ctrl+F
Find. Similar to Sublime Ctrl+F. If text is selected the find selected text (Similar to Sublime Ctrl+F3).
Ctrl+G
Goto Line Number. Similar to Sublime Ctrl+G
Ctrl+H
Find and Replace. Similar to Sublime Ctrl+H.
Ctrl+J
Do Not Use. Same as Enter Key
Ctrl+K
Spare
Ctrl+L
Select entire line. Similar to Sublime Ctrl+L
Ctrl+Z
Undo. Similar to Sublime Ctrl+Z
Ctrl+X
Cut. Similar to Word and Sublime Ctrl+X
Ctrl+C
Copy. Similar to Sublime Ctrl+C
Ctrl+V
Paste. Similar to Sublime Ctrl+V
Ctrl+B
Spare. - let's keep that way for tmux compatibility
Ctrl+N
Create New File. Similar to Word.
Ctrl+M
Do Not Use.
File Tab Commands
Alt+tt
Change to next file tab. Similar to Sublime next_view Ctrl+Tab or Command+Shift+].
Alt+TT
Change to previous file tab. Similar to Sublime prev_view Ctrl+Shift+Tab or Command+Shift+[.
Select Commands
Alt+si
Similar to Sublime Ctrl+shift+J. Select lines with the indentation.
Alt+sb
Select inside curly brace. Similar to Sublime Ctrl+Command+M
Alt+se
Select from cursor to End of line
Alt+SE
Select from cursor to starting End of line
Alt+sb
Select to Bottom of File Buffer
Alt+SB
Select to Beginning of File Buffer
Alt+sm
Select from mark (alt+mm) to cursor. Similar to Sublime Ctrl+K
Alt+ss
Turn off/on selection. Similar to Sublime ESC-Key.
Alt+sw
Select to End of word.
Alt+SW
Select to starting End of word.
Movement Commands
Alt+bb
Goto bottom of file. Similar to Sublime END
Alt+BB
Goto top of file. Similar to Sublime HOME
Alt+ww
Move right one word. Similar to Sublime Ctrl+right_arrow.
Alt+WW
Move left one word. Similar to Sublime Ctrl+left_arrow.
Alt+ee
Express mode - arrow keys move faster
Alt+>
Move right half the distance
Alt+<
Move left half the distance
Alt+rn
replay named keystroke sequence
Alt+rr
replay keystroke sequence again
Ctags / Exuberant Tags
Alt+cb
ctag back
Alt+cf
ctag forward in stack
Alt+ct
ctag jump. Similar Sublime Ctrl+R
Alt+CT
ctag jump back.
Alt+cr
ctag read
Alt+cx
ctag delete history
Delete, Cut, Copy and Paste Commands
Alt+ce
Copy current pos to eol
Alt+CE
Copy sol to current pos
Alt+cw
Copy word
Alt+DD
Duplicate line. Similar to Sublime Ctrl+Shift+D
Alt+dd
aslt+dd214 duplicates 214 lines. 214 can be any number
Alt+d
del N char
Alt+xb
Delete to Bottom of Tab/Buffer/Window/File
Alt+XB
Delete to Beginning of Tab
Alt+xe
Similar to Sublime Ctrl+KK
Alt+XE
Similar to Sublime Ctrl_K+<Backspace>
Alt+xl
Delete line
Alt+xm
Delete from mark (alt+mm) to cursor
Alt+xs
Delete spaces from cursor to non-whitespace. If on non-whitespace then go to next line and do it.
Alt+XS
Delete spaces to the left
Alt+xx
Delete word under cursor
Alt+xw
Similar to Sublime Ctrl+KW
Alt+XW
Similar to Sublime Ctrl+Backspace
Alt+x
Cut multiple lines alt+x42<enter>
Alt+pl
Paste Line after current line
Alt+PL
Paste Line before current line
Find and Replace Commands
Alt+df
find word under cursor
Alt+DF
find reverse word under cursor
Alt+fa
Similar to Sublime Ctrl+Shift+F. search all open files for match
Alt+fb
find back. return to position before find operation.
Alt+ff
Similar to Sublime F3. Find next occurrence of search text.
Alt+FF
Similar to Sublime Shift+F3. Find previous occurrence.
Alt+kb
show sidebar with list of open files
Alt+KB
hide sidbar with list of open files
Alt+FR
Find previous occurrence.
Alt+fc
set find case sensitive
Alt+FC
clear find case sensitive (case insensitive)
Alt+fw
set find whole word
Alt+FW
clear find whole word
Alt+hh
Find and Replace again.
Alt+VV
Paste and Find Prev
Alt+vv
Paste and Find Next
Alt+_minus_
Jump back to previous position before Find. Similar to Sublime lued.jump_back.
Alt+_
Jump forward to next position in jump stack. Similar to Sublime lued.jump_forward.
Line Swap Commands
Alt+sl
Swap current line with next line. Similar to Sublime Ctrl+DOWN arrow
Alt+SL
Swap current line with prev line. Similar to Sublime Ctrl+UP arrow
Alt+bl
line sinks down towards bottom of file. Similar to sublime Ctrl+Shift+Down
Alt+BL
line floats up towards top of file. Similar to Sublime Ctrl+Shift+Up
Alt+br
swap current word with next word. Similar to Sublime move_word_right
Alt+BR
swap current word with prev word. Similar to Sublime move_word_left
Indent and Align Commands
Alt+ii
Indented selected lines one space
Alt+II
Unindent selected lines one space
Alt+ir
Reindents selected per defined lued.indent size
Alt+is
Set lued.indent size
Alt+aa
Select All (Entire File). Similar to Sublime Ctrl+A.
Alt+al
Align char on next line with current line
Alt+af
Align First char on next line with current line. If lines selected then align all lines with first line.
Center Cursor Commands
Alt+kc
Recenters cursor to center, press again and recenters to top. Similar to Sublime's CTRL+KC. vim's zz/zt.
Alt+KC
Recenters cursor to top, press again and recenters to center. Similar to Sublime's CTRL+KC. vim's zz/zt.
Comment Commands
Alt+cc
Comment out line. Similar to Sublime Ctrl+slash.
Alt+CC
Uncomment selected lines.
Alt+cs
Comment set. Change start of comment string.
Upper / Lower Case Commands
Alt+kl
Similar to Sublime Ctrl+KL. Convert to Lower Case
Alt+ku
Similar to Sublime Ctrl+KU. Convert to Upper Case
Mark Commands
Alt+sm
Similar to Sublime Ctrl+KA. Select from mark to cursor (set mark with alt_mm)
Alt+dm
Similar to Sublime Ctrl+KW. Delete from mark to cursor (set mark with alt_mm)
Alt+m
Set Named Marker
Alt+M
Goto Named Marker
Alt+mm
Similar to Sublime Ctrl+K+space. Set Mark
Alt+MM
Goto previous mark
Alt+mn
Goto next mark in stack
Insert Line Before / After Commands
Alt+ll
Goto to end of line and insert new line. similar to vi's o. Similar to Sublime Ctrl+Enter
Alt+LL
Goto beginning of line and insert new line. similar to vi's O. Similar to Sublime Ctrl+Shift+Enter
Page Up / Down Commands
Alt+p
Move down N lines
Alt+P
Move up N lines
Alt+pp
Similar to Sublime <PageDn> (or ctrl+u in vintage mode) , move down half page
Alt+PP
Similar to Sublime <PageUp> (or ctrl+d in vintage mode), move up half page
Remove Tabs and Spaces
Alt+ralt
Replace all leading tabs with spaces at start of line
Alt+rats
Remove all trailing spaces at end of line
Alt+ratsall
Remove all trailing spaces in all files
Alt+z
Similar to Sublime Ctrl-z. Undo. After alt-z is used, ctrl-z becomes unix suspend command.
Alt+incr
Read number at current position, go down a line, and replace number with incremented value.
Alt+decr
Decrement next line's index.
Configuration Commands
Alt+.c
Toggle Ctrl+C between Cut and Kill Process
Alt+.ind
Turn auto-lued.indent on/off
Alt+.edi
Change from Lua mode to Edit mode. You almost always want to be in edit mode.
Alt+.lua
Toggle to Lua mode to enter lua commands. Rarely used.
Alt+.mlt
Set minimum lines to from top of page to cursor
Alt+.mlb
Set minimum lines from cursor to bottom of page
Alt+.ps
Change number of lines for page up/down command
Alt+.sl
Toggle on/off the status line
Alt+.slr
Toggle status line being shown in reverse video
Alt+.tab
Toggle replace tabs with spaces as you type (defaults to replace)
Alt+.rts
Toggle on/off remove trailing spaces as you type (defaults to don't remove)
Alt+p_squote
Put string into lued.paste buffer
Misc Commands
Alt+^
Delete from cursor to start of line
Alt+$
Delete from cursor to end of line
Alt+//
Find forward
Alt+:w
Save File. Similar to Vi :w
Alt+colors
Show colors
Alt+cd
Change directory
Alt+ed
Change to EDIT mode. You almost always want to be in EDIT mode.
Alt+help
Help. Open lued_bindings.lua
Alt+jj
Similar to Sublime Ctrl+J. Join lines.
Alt+ln
show absolute line numbers
Alt+LN
hide absolute line numbers
Alt+rln
show relative line numbers
Alt+RLN
hide relative line numbers
Alt+ls
unix ls command. dos dir command
Alt+LU
Change to LUA mode. You rarely want to be in lua mode.
Alt+nop
No Op. (same as Alt+NOOP)
Alt+noop
No Op (same as Alt+NOP)
Alt+qq
Wrap line at cursor. Subsequent lines end at previous line. Similar to Sublime Alt+q