SlideShare a Scribd company logo
1 of 34
PIMP ZHNG YOUR VIM
  make your vim really powerful ah!
CALVIN CHENG
     www.calvinx.com
www.od-eon.com/blogs/calvin
1   What is Simi si vim?


         2   Installing vim



                    3   The Basics
4   git + pathogen + vim



        5   python + vim


                 6
                     Compile source
7   Funny vim
1
What is Simi si vim?
Simple, powerful, customizable text editor
2
Installing vim
Linux: binary via package managers or compile from source
 Mac OS X (unix-style OS): via package managers or compile from source
 Windows binary or compile from source
 or just hop over to http://www.vim.org/

Example:

            sudo aptitude install vim

            sudo pacman -S vim

            sudo port install vim
3
The Basics
Start point for beginners

vimtutor
Modes you will become familiar with


normal mode
visual mode
select mode
operator pending mode
insert mode
command-line mode
Customization (Where you begin ‘zhng-ing’)

.vimrc
.vim directory
4
git + pathogen + vim
What is pathogen.vim?

Manage your runtime paths
Clean organization of your vim plugins
No more manual plugin upgrades!
Getting infected with pathogen

 Install to ~/.vim/autoload/pathogen.vim

How:

  mkdir -p ~/.vim/{autoload,bundle}

  curl -so ~/.vim/autoload/pathogen.vim 
     https://raw.github.com/tpope/vim-pathogen/HEAD/autoload/pathogen.vim
Getting infected with pathogen

Add this to your .vimrc file:

call pathogen#infect()
Managing plugins with git - super easy!


cd ~/.vim/bundle

git clone git://github.com/tpope/vim-fugitive.git
Some of my favorite plugins

Conque-Shell
IndentAnything
fugitive
nerdcommenter
nerdtree
python.vim
django.vim
vim-javascript
mxml.vim
5
python + vim
You know the drill...


cd ~/.vim/bundle

git clone https://github.com/vim-scripts/python.vim--Vasiliev.git python.vim
Not just Python syntax/indentation support
6
compile vim from source
Default binary package may not have all features

+clipboard
+X11
+python
+python3
+ruby

... etc
Take matters into your own hands!

Compile from source
Traditional compilation, download package, ./configure [option]
Or if you use linux OSes with powerful build tools (e.g. ABS for
Arch, emerge/ebuild for Gentoo)
Specify specific features/options to be enabled during
compilation, e.g. in PKGBUILD for arch
7
Funny vim
Great community, Great sense of humor


:help 42

:help!

:help quotes

:help holy-grail
Great community, Great sense of humor


#vim on irc freenode

http://vim.wikia.com
Stefan Talpalaru   Liviu Bogdan Chiributa        Chng Nai Yun   That’s Me! :-)




                                    + ........
Questions and Discussion welcome!

    calvin.cheng@od-eon.com

More Related Content

What's hot

Madagascar2011 - 04 - Présentation configuration pratical work
Madagascar2011 - 04 - Présentation configuration pratical workMadagascar2011 - 04 - Présentation configuration pratical work
Madagascar2011 - 04 - Présentation configuration pratical work
otb
 
Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Proxy server ubuntu 12.04
Proxy server ubuntu 12.04
Tio Aldiansyah
 

What's hot (20)

Deployment tales
Deployment talesDeployment tales
Deployment tales
 
Deployment tales
Deployment talesDeployment tales
Deployment tales
 
Basic Git Tutorial
Basic Git TutorialBasic Git Tutorial
Basic Git Tutorial
 
懷舊半殘的Win98體驗
懷舊半殘的Win98體驗懷舊半殘的Win98體驗
懷舊半殘的Win98體驗
 
3 manual installation of open vpn
3 manual installation of open vpn3 manual installation of open vpn
3 manual installation of open vpn
 
Minio: Associated projects in Go programming.
Minio: Associated projects in Go programming. Minio: Associated projects in Go programming.
Minio: Associated projects in Go programming.
 
Apples and Oranges-- Introductory Comparison between PHP and Python
Apples and Oranges-- Introductory Comparison between PHP and PythonApples and Oranges-- Introductory Comparison between PHP and Python
Apples and Oranges-- Introductory Comparison between PHP and Python
 
Yum server ( FTP Server )
Yum server ( FTP Server ) Yum server ( FTP Server )
Yum server ( FTP Server )
 
Introduction to Raspberry Pi
Introduction to Raspberry PiIntroduction to Raspberry Pi
Introduction to Raspberry Pi
 
Madagascar2011 - 04 - Présentation configuration pratical work
Madagascar2011 - 04 - Présentation configuration pratical workMadagascar2011 - 04 - Présentation configuration pratical work
Madagascar2011 - 04 - Présentation configuration pratical work
 
Python+anaconda Development Environment
Python+anaconda Development EnvironmentPython+anaconda Development Environment
Python+anaconda Development Environment
 
Making Security Invisible
Making Security InvisibleMaking Security Invisible
Making Security Invisible
 
Containers from scratch
Containers from scratchContainers from scratch
Containers from scratch
 
Volatility101
Volatility101Volatility101
Volatility101
 
Ubuntu presentation
Ubuntu presentationUbuntu presentation
Ubuntu presentation
 
Vagrant - Team Development made easy
Vagrant - Team Development made easyVagrant - Team Development made easy
Vagrant - Team Development made easy
 
Internet Archive Video Presentation
Internet Archive Video Presentation Internet Archive Video Presentation
Internet Archive Video Presentation
 
Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Proxy server ubuntu 12.04
Proxy server ubuntu 12.04
 
Creación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virshCreación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virsh
 
Linux encrypted container
Linux encrypted containerLinux encrypted container
Linux encrypted container
 

Similar to zhng your vim

Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Aaron Meurer
 
Open Source Virtualization Hacks
Open Source Virtualization HacksOpen Source Virtualization Hacks
Open Source Virtualization Hacks
Niel Bornstein
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
Carlos Eduardo
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
D
 
Development platform virtualization using qemu
Development platform virtualization using qemuDevelopment platform virtualization using qemu
Development platform virtualization using qemu
Premjith Achemveettil
 

Similar to zhng your vim (20)

Vim
VimVim
Vim
 
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Open Source Virtualization Hacks
Open Source Virtualization HacksOpen Source Virtualization Hacks
Open Source Virtualization Hacks
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
 
andrew's guide to vim
andrew's guide to vimandrew's guide to vim
andrew's guide to vim
 
Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Django
 
Development platform virtualization using qemu
Development platform virtualization using qemuDevelopment platform virtualization using qemu
Development platform virtualization using qemu
 
Vim Showcase
Vim ShowcaseVim Showcase
Vim Showcase
 
Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
 
PHP selber bauen
PHP selber bauenPHP selber bauen
PHP selber bauen
 
Mpeg guide
Mpeg  guideMpeg  guide
Mpeg guide
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
2.Accessing the Pi
2.Accessing the Pi2.Accessing the Pi
2.Accessing the Pi
 
Python on FreeBSD
Python on FreeBSDPython on FreeBSD
Python on FreeBSD
 

More from Calvin Cheng

More from Calvin Cheng (15)

FOSSASIA 2018 Self-Sovereign Identity with Hyperledger Indy/Sovrin
FOSSASIA 2018 Self-Sovereign Identity with Hyperledger Indy/SovrinFOSSASIA 2018 Self-Sovereign Identity with Hyperledger Indy/Sovrin
FOSSASIA 2018 Self-Sovereign Identity with Hyperledger Indy/Sovrin
 
Hashgraph as Code
Hashgraph as CodeHashgraph as Code
Hashgraph as Code
 
Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)
 
Functional Programming for OO Programmers (part 1)
Functional Programming for OO Programmers (part 1)Functional Programming for OO Programmers (part 1)
Functional Programming for OO Programmers (part 1)
 
iOS Beginners Lesson 4
iOS Beginners Lesson 4iOS Beginners Lesson 4
iOS Beginners Lesson 4
 
iOS Beginners Lesson 3
iOS Beginners Lesson 3iOS Beginners Lesson 3
iOS Beginners Lesson 3
 
iOS Beginners Lesson 2
iOS Beginners Lesson 2iOS Beginners Lesson 2
iOS Beginners Lesson 2
 
iOS Beginners Lesson 1
iOS Beginners Lesson 1iOS Beginners Lesson 1
iOS Beginners Lesson 1
 
So, you want to build a Bluetooth Low Energy device?
So, you want to build a Bluetooth Low Energy device?So, you want to build a Bluetooth Low Energy device?
So, you want to build a Bluetooth Low Energy device?
 
Fabric
FabricFabric
Fabric
 
Learning iOS and hunting NSZombies in 3 weeks
Learning iOS and hunting NSZombies in 3 weeksLearning iOS and hunting NSZombies in 3 weeks
Learning iOS and hunting NSZombies in 3 weeks
 
Ladypy 01
Ladypy 01Ladypy 01
Ladypy 01
 
Django101 geodjango
Django101 geodjangoDjango101 geodjango
Django101 geodjango
 
Saving Gaia with GeoDjango
Saving Gaia with GeoDjangoSaving Gaia with GeoDjango
Saving Gaia with GeoDjango
 
Agile Apps with App Engine
Agile Apps with App EngineAgile Apps with App Engine
Agile Apps with App Engine
 

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

zhng your vim

  • 1. PIMP ZHNG YOUR VIM make your vim really powerful ah!
  • 2. CALVIN CHENG www.calvinx.com www.od-eon.com/blogs/calvin
  • 3. 1 What is Simi si vim? 2 Installing vim 3 The Basics
  • 4. 4 git + pathogen + vim 5 python + vim 6 Compile source
  • 5. 7 Funny vim
  • 6. 1 What is Simi si vim?
  • 8.
  • 10. Linux: binary via package managers or compile from source Mac OS X (unix-style OS): via package managers or compile from source Windows binary or compile from source or just hop over to http://www.vim.org/ Example: sudo aptitude install vim sudo pacman -S vim sudo port install vim
  • 12. Start point for beginners vimtutor
  • 13. Modes you will become familiar with normal mode visual mode select mode operator pending mode insert mode command-line mode
  • 14. Customization (Where you begin ‘zhng-ing’) .vimrc .vim directory
  • 15.
  • 17. What is pathogen.vim? Manage your runtime paths Clean organization of your vim plugins No more manual plugin upgrades!
  • 18.
  • 19. Getting infected with pathogen Install to ~/.vim/autoload/pathogen.vim How: mkdir -p ~/.vim/{autoload,bundle} curl -so ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/HEAD/autoload/pathogen.vim
  • 20. Getting infected with pathogen Add this to your .vimrc file: call pathogen#infect()
  • 21. Managing plugins with git - super easy! cd ~/.vim/bundle git clone git://github.com/tpope/vim-fugitive.git
  • 22. Some of my favorite plugins Conque-Shell IndentAnything fugitive nerdcommenter nerdtree python.vim django.vim vim-javascript mxml.vim
  • 24. You know the drill... cd ~/.vim/bundle git clone https://github.com/vim-scripts/python.vim--Vasiliev.git python.vim
  • 25. Not just Python syntax/indentation support
  • 26.
  • 28. Default binary package may not have all features +clipboard +X11 +python +python3 +ruby ... etc
  • 29. Take matters into your own hands! Compile from source Traditional compilation, download package, ./configure [option] Or if you use linux OSes with powerful build tools (e.g. ABS for Arch, emerge/ebuild for Gentoo) Specify specific features/options to be enabled during compilation, e.g. in PKGBUILD for arch
  • 31. Great community, Great sense of humor :help 42 :help! :help quotes :help holy-grail
  • 32. Great community, Great sense of humor #vim on irc freenode http://vim.wikia.com
  • 33. Stefan Talpalaru Liviu Bogdan Chiributa Chng Nai Yun That’s Me! :-) + ........
  • 34. Questions and Discussion welcome! calvin.cheng@od-eon.com

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n