📝 Added more nvim notes and bookmarked reference
This commit is contained in:
parent
9ea6087905
commit
5586b7d22f
7 changed files with 61 additions and 4 deletions
|
|
@ -79,6 +79,9 @@ vim.cmd[[noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')]]
|
|||
vim.cmd[[nnoremap <silent> <F11> :set spell!<cr>]]
|
||||
vim.cmd[[inoremap <silent> <F11> <C-O>:set spell!<cr>]]
|
||||
|
||||
-- prevents opening files with nv causing vim to hang
|
||||
vim.cmd[[nnoremap gX :silent :execute "!xdg-open" expand('%:p:h') . "/" . expand("<cfile") " &"<cr>]]
|
||||
|
||||
-- lab.nvim keybindings
|
||||
vim.cmd[[nnoremap <F4> :Lab code stop<CR>]]
|
||||
vim.cmd[[nnoremap <F5> :Lab code run<CR>]]
|
||||
|
|
|
|||
3
aliases
3
aliases
|
|
@ -359,6 +359,9 @@ alias {tomprestonwerner,tpw}="links https://tom.preston-werner.com"
|
|||
alias professorleonard="librewolf https://www.youtube.com/c/ProfessorLeonard &"
|
||||
|
||||
# Blogs
|
||||
# the valueable.dev has some great solid timeless advice on programming (and
|
||||
# good vim tricks)
|
||||
alias valuable="librewolf https://thevaluable.dev/ &"
|
||||
# Unix Sheikh, very good info regarding Unix and Linux
|
||||
alias unixsheikh="links https://unixsheikh.com"
|
||||
# A reddit like forum similar also to hackernews
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -180,7 +180,17 @@
|
|||
"githubassets.com",
|
||||
"pornhub.com",
|
||||
"phncdn.com",
|
||||
"xhcdn.com"
|
||||
"xhcdn.com",
|
||||
"debian.org",
|
||||
"https://www.linux-magazine.com",
|
||||
"codeberg.org",
|
||||
"https://people.skolelinux.org/pere/blog/",
|
||||
"https://www.openstreetmap.org",
|
||||
"https://lkml.org",
|
||||
"§:bitchute.com",
|
||||
"§:cloudflare.com",
|
||||
"https://thevaluable.dev",
|
||||
"§:icons8.com"
|
||||
],
|
||||
"untrusted": [
|
||||
"google.com",
|
||||
|
|
@ -192,7 +202,8 @@
|
|||
"ajax.googleapis.com",
|
||||
"https://google-webfonts-helper.herokuapp.com/fonts",
|
||||
"googlevideo.com",
|
||||
"maps.googleapis.com"
|
||||
"maps.googleapis.com",
|
||||
"google-analytics.com"
|
||||
],
|
||||
"custom": {
|
||||
"https://upload.wikimedia.org/wikipedia/commons/0/03/Linus-linux.ogg": {
|
||||
|
|
|
|||
|
|
@ -79,6 +79,9 @@ vim.cmd[[noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')]]
|
|||
vim.cmd[[nnoremap <silent> <F11> :set spell!<cr>]]
|
||||
vim.cmd[[inoremap <silent> <F11> <C-O>:set spell!<cr>]]
|
||||
|
||||
-- prevents opening files with nv causing vim to hang
|
||||
vim.cmd[[nnoremap gX :silent :execute "!xdg-open" expand('%:p:h') . "/" . expand("<cfile") " &"<cr>]]
|
||||
|
||||
-- lab.nvim keybindings
|
||||
vim.cmd[[nnoremap <F4> :Lab code stop<CR>]]
|
||||
vim.cmd[[nnoremap <F5> :Lab code run<CR>]]
|
||||
|
|
|
|||
|
|
@ -65,6 +65,23 @@ di{ - will delete everything encapsulated in the following curly brackets
|
|||
di[ - will delte everything encapsulated in the following square brackets
|
||||
di" - will delte everything encapsulated in the following quotation marks
|
||||
|
||||
g - go
|
||||
gg - go to top of document
|
||||
shift + g - go to bottom of document
|
||||
gf - go to file underneath cursor (html files are brought in using wget and
|
||||
rendered in editor)
|
||||
gx - go to address and open with default BROWSER or FILE EXPLORER
|
||||
gX - open file in file manager
|
||||
gi - go to place in document where you last entered insert mode, and also enter insert mode (where did I leave off?)
|
||||
gv - go to last selected text and enter visual mode
|
||||
gn - go to the selection of your last search
|
||||
gI insert text at the beginning of the line, no matter what the first characters
|
||||
are
|
||||
ga - print the hex code of the character under the cursor
|
||||
gu - convert enter line to lowercase
|
||||
gU - convert enter line to uppercase
|
||||
|
||||
|
||||
y - beginning y keybinding, yanks or copies character or word for pasting elsewhere using the p keybinding
|
||||
(can be prepended by a number, and multiples the amount of words/lines to be copied)
|
||||
yh - copies one word back (equivalent to yb)
|
||||
|
|
@ -106,6 +123,15 @@ ctrl + w + s - open up a horizontal split window
|
|||
|
||||
:e ./name_of_file_to_open - not as good as fzf, but is a decent native file finder in nvim
|
||||
|
||||
/ simple search command
|
||||
: enter COMMAND mode
|
||||
|
||||
INTERESTING CHAINS
|
||||
:1,40d - Delete line 1 to 40 included
|
||||
:2,$d - Delete every line from the second one to the end of the file
|
||||
:.,$d - Delete every line from the current line to the end of the file
|
||||
:%d - delete every line
|
||||
|
||||
FROM NORMAL MODE, ENTERING OTHER MODES
|
||||
i - enter INSERT mode at the current cursor position
|
||||
a - enter INSERT mode at the following cursor position (appending)
|
||||
|
|
@ -158,6 +184,8 @@ SHIFT + m Open up Markdown Preview for .md files (mainly used for README.md)
|
|||
|
||||
CTRL + p Open fuzzy file finder like search application
|
||||
|
||||
CTRL + o Return from gf (navigate to file)
|
||||
|
||||
:Neoformat Formats most code options (don't use with .c or .cpp files as there is another application i use for that)
|
||||
|
||||
cp alias for using ClangFormat C/C++ Formatter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue