1"use strict";(globalThis.webpackChunkmikes_dev_notebook=globalThis.webpackChunkmikes_dev_notebook||[]).push([[15593],{142579(e,i,n){n.r(i),n.d(i,{assets:()=>h,contentTitle:()=>l,default:()=>x,frontMatter:()=>r,metadata:()=>d,toc:()=>c});const d=JSON.parse('{"id":"DevOps/Linux/2021-10-09--editor-from-hell/index","title":"Editor from Hell","description":"Harbin , China","source":"@site/docs/DevOps/Linux/2021-10-09--editor-from-hell/index.md","sourceDirName":"DevOps/Linux/2021-10-09--editor-from-hell","slug":"/DevOps/Linux/2021-10-09--editor-from-hell/2021-10-09","permalink":"/docs/DevOps/Linux/2021-10-09--editor-from-hell/2021-10-09","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/DevOps/Linux/2021-10-09--editor-from-hell/index.md","tags":[{"inline":true,"label":"Linux","permalink":"/docs/tags/linux"}],"version":"current","sidebarPosition":7010,"frontMatter":{"sidebar_position":7010,"slug":"2021-10-09","title":"Editor from Hell","authors":"mpolinowski","tags":["Linux"]},"sidebar":"tutorialSidebar","previous":{"title":"The friendly Editor","permalink":"/docs/DevOps/Linux/2021-10-09--the-friendly-editor/2021-10-09"},"next":{"title":"Installing OpenWRT on a Raspberry Pi 4","permalink":"/docs/DevOps/Linux/2021-09-02--openwrt-raspberry-pi/2021-09-02"}}');var t=n(474848),s=n(28453);const r={sidebar_position:7010,slug:"2021-10-09",title:"Editor from Hell",authors:"mpolinowski",tags:["Linux"]},l=void 0,h={},c=[{value:"Vi vs Vim",id:"vi-vs-vim",level:2},{value:"Command Overview",id:"command-overview",level:3},{value:"Creating Files",id:"creating-files",level:4},{value:"Navigation",id:"navigation",level:4},{value:"Editing",id:"editing",level:4},{value:"Customization",id:"customization",level:4}];function o(e){const i={a:"a",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"Harbin , China",src:n(830840).A+"",width:"1500",height:"509"})}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.a,{href:"#vi-vs-vim",children:"Vi vs Vim"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:[(0,t.jsx)(i.a,{href:"#command-overview",children:"Command Overview"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"#creating-files",children:"Creating Files"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"#navigation",children:"Navigation"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"#editing",children:"Editing"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"#customization",children:"Customization"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(i.blockquote,{children:["\n",(0,t.jsx)(i.p,{children:"Back, Down, Down, Front, Punch - Come over here!"}),"\n"]}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"Finish him",src:n(441185).A+"",width:"400",height:"254"})}),"\n",(0,t.jsx)(i.h2,{id:"vi-vs-vim",children:"Vi vs Vim"}),"\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.a,{href:"https://vimhelp.org/vi_diff.txt.html#vi-differences",children:"vi vs vim"}),"."]}),"\n",(0,t.jsx)(i.h3,{id:"command-overview",children:"Command Overview"}),"\n",(0,t.jsx)(i.h4,{id:"creating-files",children:"Creating Files"}),"\n",(0,t.jsxs)(i.table,{children:[(0,t.jsx)(i.thead,{children:(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.th,{children:"Vi"}),(0,t.jsx)(i.th,{children:"Vim"}),(0,t.jsx)(i.th,{children:"Description"})]})}),(0,t.jsxs)(i.tbody,{children:[(0,t.jsxs)(i.tr,{children:[(0,t.jsxs)(i.td,{children:[":q",", ",":q","!, null"]}),(0,t.jsxs)(i.td,{children:[":q",", ",":q","!, ",":qa","!"]}),(0,t.jsx)(i.td,{children:"Close document, force close, close all"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"i, Esc"}),(0,t.jsx)(i.td,{children:"i, Esc"}),(0,t.jsx)(i.td,{children:"Insert Mode, Exit Insert Mode"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsxs)(i.td,{children:[":w",", ",":w"," filename.txt, ",":wq","!"]}),(0,t.jsxs)(i.td,{children:[":w",", ",":w"," filename.txt, ",":wq","!"]}),(0,t.jsx)(i.td,{children:"Save file, Save fie with filename, Save and quit"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsxs)(i.td,{children:[":e"," filename.txt"]}),(0,t.jsxs)(i.td,{children:[":e"," filename.txt"]}),(0,t.jsx)(i.td,{children:"Edit existing file"})]})]})]}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"I am Developer - Vim",src:n(972540).A+"",width:"480",height:"305"})}),"\n",(0,t.jsx)(i.h4,{id:"navigation",children:"Navigation"}),"\n",(0,t.jsxs)(i.table,{children:[(0,t.jsx)(i.thead,{children:(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.th,{children:"Vi"}),(0,t.jsx)(i.th,{children:"Vim"}),(0,t.jsx)(i.th,{children:"Description"})]})}),(0,t.jsxs)(i.tbody,{children:[(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"h,j,k,l (or cursor)"}),(0,t.jsx)(i.td,{children:"h,j,k,l (or cursor)"}),(0,t.jsx)(i.td,{children:"left, down, up, right"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"w, e"}),(0,t.jsx)(i.td,{children:"w, e"}),(0,t.jsx)(i.td,{children:"jump to next word, end of the word"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"(, ), {, }"}),(0,t.jsx)(i.td,{children:"(, ), {, }"}),(0,t.jsx)(i.td,{children:"Beginning/End of sentence or paragraph"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"/query"}),(0,t.jsx)(i.td,{children:"/query"}
1),(0,t.jsxs)(i.td,{children:["Replace ",(0,t.jsx)(i.code,{children:"query"})," with the word you are searching for"]})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"#"}),(0,t.jsx)(i.td,{children:"#"}),(0,t.jsx)(i.td,{children:"find instances of word under cursor in document"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:":linenumber"}),(0,t.jsx)(i.td,{children:":linenumber"}),(0,t.jsx)(i.td,{children:"Go to line"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"Shift+G, double g"}),(0,t.jsx)(i.td,{children:"Shift+G, double g"}),(0,t.jsx)(i.td,{children:"Go to end / beginning of file"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"Ctrl+f, Ctrl+b"}),(0,t.jsx)(i.td,{children:"Ctrl+f, Ctrl+b"}),(0,t.jsx)(i.td,{children:"Next / previous page"})]})]})]}),"\n",(0,t.jsx)(i.h4,{id:"editing",children:"Editing"}),"\n",(0,t.jsxs)(i.table,{children:[(0,t.jsx)(i.thead,{children:(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.th,{children:"Vi"}),(0,t.jsx)(i.th,{children:"Vim"}),(0,t.jsx)(i.th,{children:"Description"})]})}),(0,t.jsxs)(i.tbody,{children:[(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"d+w, d+), d+d"}),(0,t.jsx)(i.td,{children:"d+w, d+), d+d"}),(0,t.jsx)(i.td,{children:"delete word, sentence, line"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"u"}),(0,t.jsx)(i.td,{children:"u"}),(0,t.jsx)(i.td,{children:"undo"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"y+w, y+), y+d"}),(0,t.jsx)(i.td,{children:"y+w, y+), y+d"}),(0,t.jsx)(i.td,{children:"copy word, sentence, line"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"p"}),(0,t.jsx)(i.td,{children:"p"}),(0,t.jsx)(i.td,{children:"paste copied content"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"null"}),(0,t.jsx)(i.td,{children:"Shift+v, Ctrl+v"}),(0,t.jsx)(i.td,{children:"Select line, select block"})]})]})]}),"\n",(0,t.jsx)(i.h4,{id:"customization",children:"Customization"}),"\n",(0,t.jsxs)(i.table,{children:[(0,t.jsx)(i.thead,{children:(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.th,{children:"Vi"}),(0,t.jsx)(i.th,{children:"Vim"}),(0,t.jsx)(i.th,{children:"Description"})]})}),(0,t.jsxs)(i.tbody,{children:[(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"null"}),(0,t.jsxs)(i.td,{children:[":set"," number, ",":set"," nonumber"]}),(0,t.jsx)(i.td,{children:"Add/Remove line numbering"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"null"}),(0,t.jsxs)(i.td,{children:[":set"," wrap linebreak"]}),(0,t.jsx)(i.td,{children:"Add soft word wrap"})]}),(0,t.jsxs)(i.tr,{children:[(0,t.jsx)(i.td,{children:"null"}),(0,t.jsx)(i.td,{children:"vim -d file1 file2"}),(0,t.jsx)(i.td,{children:"Show diff between two text files"})]})]})]})]})}function x(e={}){const{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}},972540(e,i,n){const d=n.p+"assets/images/Cku5Dv1WkAA9tOK-3ab842dd42a7f965df1bb0a35642077c.jpg";n.d(i,["A",0,d])},441185(e,i,n){const d=n.p+"assets/images/finish_him-b8d5912e9f8ee2662baae85dfc75fe7a.gif";n.d(i,["A",0,d])},830840(e,i,n){const d=n.p+"assets/images/photo-kt443t6d_64hdh43hfh6dgjdfhg4_d-164fe9385f1326d03a3028fe25917bd7.jpg";n.d(i,["A",0,d])},28453(e,i,n){n.d(i,{R:()=>r,x:()=>l});var d=n(296540);const t={},s=d.createContext(t);function r(e){const i=d.useContext(s);return d.useMemo(function(){return"function"==typeof e?e(i):{...i,...e}},[i,e])}function l(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),d.createElement(s.Provider,{value:i},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.