aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMax Christian Pohle2024-05-12 21:01:00 +0200
committerMax Christian Pohle2024-05-12 21:01:00 +0200
commiteec48ff71881d8757b79dcd95aac9dac4d71bf72 (patch)
tree8e21c80a8fecbcf7a6b36c3db1d2aa061bda1959 /doc
parentf3eb203b4ad79090e36982e7b417c0cf0de52646 (diff)
downloadvim-eec48ff71881d8757b79dcd95aac9dac4d71bf72.tar.bz2
vim-eec48ff71881d8757b79dcd95aac9dac4d71bf72.zip
tidied this repo up and uploaded my new nvim from scratch config
Diffstat (limited to 'doc')
-rw-r--r--doc/coderonline-vim.pngbin91868 -> 0 bytes
-rw-r--r--doc/git2
-rw-r--r--doc/git.txt3
-rw-r--r--doc/gtk.css7
-rw-r--r--doc/list-of-filetypes.txt175
-rw-r--r--doc/readme.md15
-rw-r--r--doc/screen.txt9
-rw-r--r--doc/shortcuts.txt206
8 files changed, 0 insertions, 417 deletions
diff --git a/doc/coderonline-vim.png b/doc/coderonline-vim.png
deleted file mode 100644
index 156ff3a..0000000
--- a/doc/coderonline-vim.png
+++ /dev/null
Binary files differ
diff --git a/doc/git b/doc/git
deleted file mode 100644
index 1205d00..0000000
--- a/doc/git
+++ /dev/null
@@ -1,2 +0,0 @@
1undo last commit: git reset HEAD~
2diff two branches: git diff branch1 branch2 path/to/file
diff --git a/doc/git.txt b/doc/git.txt
deleted file mode 100644
index 517f998..0000000
--- a/doc/git.txt
+++ /dev/null
@@ -1,3 +0,0 @@
1GIT_PAGER=less git config --list | awk 'match($0, "submodule.(.*).url=(.*)",q){ system("echo git submodule add " q[2] " " q[1]) }'
2
3branchvv = for-each-ref --sort='committerdate:raw' --format='%(HEAD)%(if)%(HEAD)%(then)%(color:bold green)%(end) %(align:width=24)%(refname:short)%(end) %(objectname:short) %(color:bold blue)%(committerdate:iso)%(color:reset) %(if)%(upstream)%(then)[%(color:blue)%(upstream:short)%(color:reset)] %(end)%(subject)' refs/heads
diff --git a/doc/gtk.css b/doc/gtk.css
deleted file mode 100644
index 5f15661..0000000
--- a/doc/gtk.css
+++ /dev/null
@@ -1,7 +0,0 @@
1/* to be saved as ~/.config/gtk-3.0/gtk.css
2 * thanks to http://stackoverflow.com/users/6899000/proprefenetre */
3@define-color YOUR_BACKGROUND_COLOR #rrggbb;
4
5window#vim-main-window {
6 background-color: @YOUR_BACKGROUND_COLOR;
7}
diff --git a/doc/list-of-filetypes.txt b/doc/list-of-filetypes.txt
deleted file mode 100644
index 9752c6a..0000000
--- a/doc/list-of-filetypes.txt
+++ /dev/null
@@ -1,175 +0,0 @@
1# this list can be generated with ':setfiletype <C-d>'. I have copied it to
2# make it searchable.
3
42html erlang master sinda
5HGAnnotate eruby matlab sindacmp
6PKGBUILD esmtprc maxima sindaout
7a2ps esqlc mel sisu
8a65 esterel messages skill
9aap eterm mf sl
10abap euphoria3 mgl slang
11abaqus euphoria4 mgp slice
12abc eviews mib slim
13abel exim mix slpconf
14acedb expect mma slpreg
15ada exports mmix slpspi
16aflex falcon mmp slrnrc
17ahdl fan modconf slrnsc
18alsaconf fasm model sm
19amiga fdcc modsim3 smarty
20aml fetchmail modula2 smcl
21ampl fgl modula3 smil
22ansible fish monk smith
23ansible_hosts flexwiki moo sml
24ansible_template focexec mp snnsnet
25ant form mplayerconf snnspat
26antlr forth mrxvtrc snnsres
27apache fortran msidl snobol4
28apachestyle foxpro msmessages solidity
29aptconf framescript msql spec
30arch freebasic mupad specman
31arduino fstab mush spice
32art fvwm mustache splint
33asciidoc fvwm2m4 muttrc spup
34asm gdb mysql spyce
35asm68k gdmo named sql
36asmh8300 gedcom nanorc sqlanywhere
37asn git nasm sqlforms
38aspperl gitcommit nastran sqlhana
39aspvbs gitconfig natural sqlinformix
40asterisk gitolite ncf sqlj
41asteriskvm gitrebase netrc sqloracle
42atlas gitsendemail netrw sqr
43augeas gkrellmrc nginx squid
44autohotkey glsl nim srec
45autoit gnash ninja sshconfig
46automake gnomecat nix sshdconfig
47ave gnuplot nosyntax st
48avra go nqc stata
49awk godefstack nroff stp
50ayacc godoc nsis strace
51b gohtmltmpl obj stylus
52baan gotexttmpl objc sudoers
53basic gp objcpp svg
54bc gpg ocaml svn
55bdf gprof occam swift
56bib grads octave syncolor
57bib_latexSuite gretl omnimark synload
58bindzone groff opencl syntax
59blade groovy openroad sysctl
60blank group opl systemd
61bst grub ora systemverilog
62btm gsp pamconf tads
63bzl gtkrc papp tags
64bzr haml pascal tak
65c hamster passwd takcmp
66cabal handlebars pcap takout
67calendar haskell pccts tap
68catalog haste pdf tar
69cdl hastepreproc perl taskdata
70cdrdaoconf haxe perl6 taskedit
71cdrtoc haxe_extended pf tasm
72cf hb pfmain tcl
73cfg help pgsql tcsh
74ch hercules php teraterm
75chaiscript hex phtml terminfo
76change hgcommit pic tex
77changelog hitest pike tex_LatexBox
78chaskell hog pilrc tex_latexSuite
79cheetah hostconf pine texinfo
80chill hostsaccess pinfo texmf
81chordpro hss plaintex text
82cl html plantuml textile
83clean html5 pli tf
84clipper htmlcheetah plm thrift
85clojure htmldjango plp tidy
86cmake htmlm4 plsql tilde
87cmake-indent htmlos po tli
88cmake-syntax hxml pod tmux
89cmusrc ia64 postscr tomdoc
90cobol ibasic pov toml
91coco icemenu povini tpp
92coffee icon ppd trasys
93color_coded idl ppwiz treetop
94colortest idlang prescribe trustees
95conaryrecipe indent privoxy tsalt
96conf inform procmail tsscl
97config initex progress tssgm
98context initng prolog tssop
99cpp inittab promela tt2
100cql ipfilter proto tt2html
101crm ishd protocols tt2js
102crontab iss ps1 twig
103cryptol ist ps1xml typescript
104crystal j psf uc
105cs jal ptcap udevconf
106csc jam pug udevperm
107cscope_plus jargon puppet udevrules
108csdl jasmine purescript uil
109csh java purifylog updatedb
110csp javacc pyrex upstart
111css javascript python upstreamdat
112cterm jess qf upstreaminstalllog
113ctrlh jgraph qml upstreamlog
114cucumber jinja2 quake upstreamrpt
115cuda jovial r usserverlog
116cupl jproperties racc usw2kagtlog
117cuplsim json radiance vala
118cuda jovial r usserverlog
119cupl jproperties racc usw2kagtlog
120cuplsim json radiance vala
121cvs jsp ragel valgrind
122cvsrc jst ratpoison vb
123cweb jsx rc vbnet
124cynlib julia rcs vcl
125cynpp kconfig rcslog velocity
126d kivy readline vera
127dart kix rebol verilog
128datascript kotlin redif verilogams
129dcd kscript registry vgrindefs
130dcl kwt remind vhdl
131debchangelog lace resolv vim
132debcontrol latextoc reva vimgo
133debsources latte rexx viminfo
134def ld rhelp virata
135denyhosts ldapconf rib vmasm
136desc ldif rmd voscm
137desktop less rnc vrml
138dictconf lex rng vroom
139dictdconf lftp rnoweb vsejcl
140diff lhaskell robots vundlelog
141dircolors libao rpcgen wdiff
142dirpager lifelines rpl web
143diva lilo rrst webmacro
144django limits rspec wget
145dns liquid rst whitespace
146dnsmasq lisp rtf winbatch
147docbk lite ruby wml
148docbksgml litestep rust wsh
149docbkxml logcheck samba wsml
150dockerfile loginaccess sas wvdial
151dosbatch logindefs sass xbl
152dosini logtalk sather xdefaults
153dot lotos sbt xf86conf
154doxygen lout scala xhtml
155dracula lpc scala.xpt xinetd
156dsl lprolog scheme xkb
157dtd lscript scilab xmath
158dtml lsl screen xml
159dtrace lss scss xmodmap
160dts lua sd xpm
161dylan lynx sdc xpm2
162dylanintr m4 sdl xquery
163dylanlid mail sed xs
164ecd mailaliases sendpr xsd
165edif mailcap sensors xsl
166eelixir make services xslt
167eiffel mallard setserial xxd
168elf man sgml yacc
169elinks manconf sgmldecl yaml
170elixir manual sgmllnx z8a
171elm maple sh zimbu
172elmfilt markdown sicad zsh
173ember-script masm sieve
174emblem mason simula
175
diff --git a/doc/readme.md b/doc/readme.md
deleted file mode 100644
index 5ea6da4..0000000
--- a/doc/readme.md
+++ /dev/null
@@ -1,15 +0,0 @@
1vim configuration
2=================
3
4This is the configuration I am using.
5
6
7Screenshot
8----------
9
10<a href="/vim/plain/doc/coderonline-vim.png">
11 <img src="/vim/plain/doc/coderonline-vim.png" width="720" alt="screenshot of vim" />
12</a>
13
14
15
diff --git a/doc/screen.txt b/doc/screen.txt
deleted file mode 100644
index 5c375d2..0000000
--- a/doc/screen.txt
+++ /dev/null
@@ -1,9 +0,0 @@
1To run vim inside a screen session:
2
3TERM=vte-256color screen vim
4
5works very well. But if you are using another terminal you may be interested in
6other possibilities, like this:
7
8find /usr/share/terminfo/ | grep screen | grep 256
9
diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt
deleted file mode 100644
index 5e911ea..0000000
--- a/doc/shortcuts.txt
+++ /dev/null
@@ -1,206 +0,0 @@
1:viusage = summary of all keyboard shortcuts
2:options = shows currently :set options (with descriptions)
3leader key = usually set to backslash expects a quick command
4
5
6[normal mode]
7f{char} = move cursor to the character {char}
8gf = open file under cursor
9<C-w>gf = open file under cursor in a tab
10<C-w>] = jump to the tag under the cursor in a new window
11<C-t> = jump back from where that ^ brought you
12K = keyword lookup for the word under the cursor (see :help kp)
13w = next word
14e = end of word (=inner word)
15
16
17@see: :h text-objects
18ci' = change between single quote
19ci" = change between double quote
20ci( = change between brace
21cit = change XML Tag
22ciw = select inner word
23caw = select 'a word'
24" where c can be replaced by v for visual mode
25
26:%s/foo/bar/g = replace all foo with bar
27:g/foo/s/bar//g = on lines with foo replace bar with nothing
28:g!/foo/s/bar//g = on lines not containing foo replace bar with nothing
29:g!/^foo/execute("normal dd") delete lines starting with foo
30
31flags, end: after the last /
32g = replace globally (all occurances on the current line)
33c = confirm each replace, also allows to switch to g (use the flag to see the help message)
34e = places the cursor in the end of the selection
35
36flags, within the search string:
37\v = use very magic search (more like perl)
38\V = use no very magic, more like searching verbatim
39\zs .. \ze = mark begin and end of a sub pattern (like perl lookaround assertions)
40
41
42
43[visual mode] # with selected lines
44gq = formats text so that it fits in whatever :set textwidth was set
45iB = select block between curly braces (:help object-select)
46
47
48[commands]
49command line mode begins with : and has its own key mappings starting with c like in cnormap
50
51:spell [word] = adds a word to the current dictionary (no mistake any more)
52:set list = display non printable characters
53:retab = replaces tabs with spaces
54:set expandtab = in insert mode: replace tab with spaces
55:Explore = cli version open file dialog (file explorer)
56:Lex = use netrw as project drawer (stays open in its own window)
57:only = 'maximize' current buffer
58
59<c-r><c-w> = auto completion with the word under the cursor (interesting with incsearch)
60<c-a> = expand pattern from command line (e.g. *.txt)
61
62
63[navigation]
64<CTRL-]> = look up the tag under the cursor (help links as well)
65<CTRL-T> = return back from tag under the cursor
66gd = jump to the declaration of the variable under the cursor
67
68
69[macros] # record and play back a series of vim commands
70qa = start (q) macro recording in register a (can be anything)
71q = stop macro recording
72@a = replay macro a
73:'<,'>normal @a = apply a to every line in the current selection
74:reg = lists all registers (including those with macros in them)
75
76[registers]
77notice, that registers get used for both: macro recordings and copying text
78
79:reg = shows contents of all registers
80"0p = pasts from register 0, which is the same as "", but not overwritten by dd
81"ap = same for register a
82"0yy = yanks to register 0 (same as y by itself)
83"ay = yanks current selection to register a (in visual mode)
84
85
86[marker]
87ma = set marker a-z (a in this case)
88mA = create a session persistent file marker which can be used to reopen a file (not bound to the buffer)
89`a = go to marker a (line & column)
90'a = go to marker a (line, first non blank), same as `a^
91
92
93
94[hotkeys]
95<C-A>, <C-X> = increment, decrement number under the cursor
96
97
98[windows]
99<C-W>v = splits buffer vertically (screen uses |)
100<C-W>s = splits buffer horizontally (same as screen)
101<C-W>w = moves the cursor to the next window and back
102<C-W>[dir] = moves the cursor in that direction (use hjkl or arrow keys)
103<C-W>[HK] = make a vertical split horizontal and vice versa
104<C-W>o = only: close all other windows
105<C-W>c = close: current window in which the cursor sits
106
107
108[vimdiff]
109do = get changes from other window into the current
110dp = put changes from current window into the other
111]c = jump to the next change
112[c = jump to the prevous change
113
114[folds]
115za = toggle a fold
116zM = close all folds
117zR = opens all folds (unfold all)
118zE = eliminates all folds
119
120
121[buffers]
122:bn = buffer next
123:bp = buffer previous
124:bd = buffer dispatch (close)
125:b <tab> = switch buffer by name (use <tab> and <return>)
126:set nobuflisted = hide buffer in buffer list (great for neovim's terminal)
127
128[args]
129:n **/*.c = opens all files with that name or type in buffers and also fills the argument list
130
131
132[special]
133g CTRL-g = display file properties including word and char count
134q: = show command history and use it like a normal buffer
135z= = show spellcheck suggestions
136
137
138[completions]
139CTRL-O = display completions: omnicomplete (context dependant completions)
140
141CTRL-X CTRL-F = display completions: file name (using vim-internals omnicomplete)
142CTRL-N CTRL-P = display completions: file keywords
143CTRL-K = display completions: dictionary
144CTRL-T = display completions: thesaurus
145CTRL-I = display completions: include files
146CTRL-] = display completions: tags
147CTRL-D = display completions: (marcro-) definitions
148CTRL-V = display completions: vim command line
149CTRL-U = display completions: user-defined
150
151
152[annoyances]
153gv = visual mode: reselect last selection
154CTRL-o = lets the caret jump back to the previous location
155CTRL-L = redraws the complete screen
156CTRL-R<register> = in insert mode and command line: paste contents of <register> (e.g. : for last command, * for clipboard)
157CTRL-R = in normal mode: redoes what has been undone with u
158"<register>p = in normal mode: paste paste contents of <register>
159
160[registers]
161"/ = last search expression
162": = last command entered
163"= = expression register (to do calculations or call vim functions)
164
165
166
167[netrw]
168:Lex = open the netrw-view as project drawer
169gn = makes the directory under the cursor the root directory
170a = toggles display of hidden files
171
172[filetype:css]
173viB:sort = sort inner block by name
174
175[vim commands]
176:for i in range(1,12) | put ='2016-'.i | endfor
177
178[fancy utf-8 symbols]
179
180
181[debugging]
182:profile! start /tmp/profile.log
183:profile func *
184:profile file *
185" At this point do slow actions
186:profdel *
187:e /tmp/profile.log
188" add a break point to a vim script (like vimrc) to invoke the internal debugger
189:breakadd here
190
191:finish = from within a viml-script: stop sourcing it
192
193[substitutions]
194delete all comments: %s/\/\*\*< [^(\*\/)]*\*\///g
195remove empty lines: global/^$/d
196remove non-empty lines: v/^$/d
197
198[programs]
199gpm - cut and paste helper for the linux console (to get text from CTRL-ALT-F2 to CTRL-ALT-F3)
200
201
202[vim modeline]
203filetype can have multiple values, like python.django
204The last line can be a mode line, which holds settings like tab width:
205
206# vim: noai:ts=2:sw=2 filetype=dosini.text
..