SlideShare a Scribd company logo
Some cool vim tricks
Ikuru K
References
● Web
● Rtfm – read the fine manual
vim +<line #> <filename>
Invoke this from the command line to open a file
at the provided line number.
Vim +/<pattern> <file name>
● Open a file at the first occurrence of the
provided pattern.
Multi line insert - 1
Starting with a file with multiple rows like this
Multi line insert - 2
● Highlight selections with visual block mode (Ctrl
+ v)
Multiple line insert - 3
● Once desired lines are selected, (Shift + i ) to
insert desired characters. Note that 'i' alone will
not do.
Multiple line edit - 4
● Hit Esc, and typed characters will be inserted
across multiple rows.
Nice things to have in .vimrc
● :set nu
– Shows line numbers to the left.
● syntax on
– Will highlight lexical elements intelligently, if vim can
make sense of the language.
'Buffer' concept
● Files in the workspace
● ':badd <filename>' adds a new file to
workspace
● 'b <buffer number>' lets you move around the
buffers.
Vertical Window
:vert sb[Next/Previous]
● Sb* command will open a file in the buffer by
splitting the current window.
● vert command forces the split occur vertically.
● Switch the focus with Ctrl+w
Running external commands
● !<any valid command on the terminal>
● After showing results, will re-open the file that
was being edited.
● Thank you
Ad

More Related Content

Similar to Elementary vim tricks (20)

andrew's guide to vim
andrew's guide to vimandrew's guide to vim
andrew's guide to vim
Andrew Yi
 
Vim knowhow
Vim knowhowVim knowhow
Vim knowhow
AkimitsuMurata
 
Unit 5 vim an advanced text editor
Unit 5 vim an advanced text editorUnit 5 vim an advanced text editor
Unit 5 vim an advanced text editor
root_fibo
 
Linux commands
Linux commandsLinux commands
Linux commands
Meenu Chopra
 
Python Scipy Numpy
Python Scipy NumpyPython Scipy Numpy
Python Scipy Numpy
Girish Khanzode
 
Vim Vi Improved
Vim Vi ImprovedVim Vi Improved
Vim Vi Improved
Tusharadri Sarkar
 
Foss manual (1)
Foss manual (1)Foss manual (1)
Foss manual (1)
Janagi Raman S
 
Python File functions
Python File functionsPython File functions
Python File functions
keerthanakommera1
 
lectuer 21-22.pptx
lectuer 21-22.pptxlectuer 21-22.pptx
lectuer 21-22.pptx
poonam256394
 
Linux Command.pptx
Linux Command.pptxLinux Command.pptx
Linux Command.pptx
SaileshB5
 
Productive text editing with Vim
Productive text editing with VimProductive text editing with Vim
Productive text editing with Vim
bryanbibat
 
Vi editor
Vi editorVi editor
Vi editor
Er Mittinpreet Singh
 
Linuxs1
Linuxs1Linuxs1
Linuxs1
rajikaa
 
Vi Editor
Vi EditorVi Editor
Vi Editor
Shiwang Kalkhanda
 
Vim and Python
Vim and PythonVim and Python
Vim and Python
majmcdonald
 
COMMAND.pptx
COMMAND.pptxCOMMAND.pptx
COMMAND.pptx
4AL20CS071MAYUR
 
Python
PythonPython
Python
Kumar Gaurav
 
Python intro
Python introPython intro
Python intro
Abhinav Upadhyay
 
ch09.ppt
ch09.pptch09.ppt
ch09.ppt
NiharikaDubey17
 
Nithi
NithiNithi
Nithi
sharmibalu
 

More from Ikuru Kanuma (20)

clj and deps.edn
clj and deps.ednclj and deps.edn
clj and deps.edn
Ikuru Kanuma
 
Kukutei shinkoku with Clojure
Kukutei shinkoku with ClojureKukutei shinkoku with Clojure
Kukutei shinkoku with Clojure
Ikuru Kanuma
 
Locarise,reagent and JavaScript Libraries
Locarise,reagent and JavaScript LibrariesLocarise,reagent and JavaScript Libraries
Locarise,reagent and JavaScript Libraries
Ikuru Kanuma
 
clara-rules
clara-rulesclara-rules
clara-rules
Ikuru Kanuma
 
ClojureScript@node
ClojureScript@nodeClojureScript@node
ClojureScript@node
Ikuru Kanuma
 
Welcome to ClojureScript
Welcome to ClojureScriptWelcome to ClojureScript
Welcome to ClojureScript
Ikuru Kanuma
 
Clojure web dev history
Clojure web dev historyClojure web dev history
Clojure web dev history
Ikuru Kanuma
 
Arachne Unweaved (JP)
Arachne Unweaved (JP)Arachne Unweaved (JP)
Arachne Unweaved (JP)
Ikuru Kanuma
 
Clojureでガラケーサイトを作る際の細かい話
Clojureでガラケーサイトを作る際の細かい話Clojureでガラケーサイトを作る際の細かい話
Clojureでガラケーサイトを作る際の細かい話
Ikuru Kanuma
 
Web forms made easy (with formative)
Web forms made easy (with formative)Web forms made easy (with formative)
Web forms made easy (with formative)
Ikuru Kanuma
 
サムネイルを作る話
サムネイルを作る話サムネイルを作る話
サムネイルを作る話
Ikuru Kanuma
 
Review June2015 Dec2015
Review June2015 Dec2015Review June2015 Dec2015
Review June2015 Dec2015
Ikuru Kanuma
 
Redmine on amazon ec2
Redmine on amazon ec2Redmine on amazon ec2
Redmine on amazon ec2
Ikuru Kanuma
 
Engineering Ethics (In Japanese)
Engineering Ethics (In Japanese)Engineering Ethics (In Japanese)
Engineering Ethics (In Japanese)
Ikuru Kanuma
 
First Real Pull Request Ever
First Real Pull Request EverFirst Real Pull Request Ever
First Real Pull Request Ever
Ikuru Kanuma
 
Pyunit
PyunitPyunit
Pyunit
Ikuru Kanuma
 
Review june2014 june2015
Review june2014 june2015Review june2014 june2015
Review june2014 june2015
Ikuru Kanuma
 
Processors in a nutshell
Processors in a nutshellProcessors in a nutshell
Processors in a nutshell
Ikuru Kanuma
 
Computer hardware, and network
Computer hardware, and networkComputer hardware, and network
Computer hardware, and network
Ikuru Kanuma
 
Installing Japanese environment(mozc) on Debian 8 + Mate
Installing Japanese environment(mozc) on Debian 8 + Mate Installing Japanese environment(mozc) on Debian 8 + Mate
Installing Japanese environment(mozc) on Debian 8 + Mate
Ikuru Kanuma
 
Kukutei shinkoku with Clojure
Kukutei shinkoku with ClojureKukutei shinkoku with Clojure
Kukutei shinkoku with Clojure
Ikuru Kanuma
 
Locarise,reagent and JavaScript Libraries
Locarise,reagent and JavaScript LibrariesLocarise,reagent and JavaScript Libraries
Locarise,reagent and JavaScript Libraries
Ikuru Kanuma
 
ClojureScript@node
ClojureScript@nodeClojureScript@node
ClojureScript@node
Ikuru Kanuma
 
Welcome to ClojureScript
Welcome to ClojureScriptWelcome to ClojureScript
Welcome to ClojureScript
Ikuru Kanuma
 
Clojure web dev history
Clojure web dev historyClojure web dev history
Clojure web dev history
Ikuru Kanuma
 
Arachne Unweaved (JP)
Arachne Unweaved (JP)Arachne Unweaved (JP)
Arachne Unweaved (JP)
Ikuru Kanuma
 
Clojureでガラケーサイトを作る際の細かい話
Clojureでガラケーサイトを作る際の細かい話Clojureでガラケーサイトを作る際の細かい話
Clojureでガラケーサイトを作る際の細かい話
Ikuru Kanuma
 
Web forms made easy (with formative)
Web forms made easy (with formative)Web forms made easy (with formative)
Web forms made easy (with formative)
Ikuru Kanuma
 
サムネイルを作る話
サムネイルを作る話サムネイルを作る話
サムネイルを作る話
Ikuru Kanuma
 
Review June2015 Dec2015
Review June2015 Dec2015Review June2015 Dec2015
Review June2015 Dec2015
Ikuru Kanuma
 
Redmine on amazon ec2
Redmine on amazon ec2Redmine on amazon ec2
Redmine on amazon ec2
Ikuru Kanuma
 
Engineering Ethics (In Japanese)
Engineering Ethics (In Japanese)Engineering Ethics (In Japanese)
Engineering Ethics (In Japanese)
Ikuru Kanuma
 
First Real Pull Request Ever
First Real Pull Request EverFirst Real Pull Request Ever
First Real Pull Request Ever
Ikuru Kanuma
 
Review june2014 june2015
Review june2014 june2015Review june2014 june2015
Review june2014 june2015
Ikuru Kanuma
 
Processors in a nutshell
Processors in a nutshellProcessors in a nutshell
Processors in a nutshell
Ikuru Kanuma
 
Computer hardware, and network
Computer hardware, and networkComputer hardware, and network
Computer hardware, and network
Ikuru Kanuma
 
Installing Japanese environment(mozc) on Debian 8 + Mate
Installing Japanese environment(mozc) on Debian 8 + Mate Installing Japanese environment(mozc) on Debian 8 + Mate
Installing Japanese environment(mozc) on Debian 8 + Mate
Ikuru Kanuma
 
Ad

Recently uploaded (20)

Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Ad

Elementary vim tricks