So, almost 2 years ago I heard about C programming language from my close friend and I thought I should give it a try and I asked “how can I start with it?” and he gave me some notes and said just install turboC++ and start writing code. So, I installed it and started with C language and eventually I got demotivated and quit programming after some time. Actually it was not fun and engaging with that environment. After one year in my college their was a seminar of network security and the guest speaker said that everyone should try python once and it is really amazing language. And I went home and searched for the python in the YouTube and found lots of tutorial on it and picked up one and that tutorial is using VSCode after that I loved that text editor and still I use it in my daily work.
In my recent days I got to know about a new text editor called vim and I recently installed and start using it. The most funny thing is when I first open a file with it I was not able to exit from it :p. Now I use it in most of the time while writing code. When you will first install it then it will look something below like this
The vim allow us to customize it however we want and we customize it by writing some code in the
~/.vimrc and if the file is not there you can add it by doing
touch ~/.vimrc command. Now add below line to your file first.
syntax enable set shell=/bin/bash set tabstop=4 set shiftwidth=4 set expandtab set number filetype indent on set autoindent set ruler set showcmd set incsearch set hlsearch set nowrap set noswapfile set incsearch set ignorecase set showmatch set showmode set mouse=a set background=dark set termguicolors
Now we will add some plugins in this file and then we are going to install it.There are couple of ways to install plugins and the way i like is by
Vundle And the section below shows how to add plugins .
set nocompatible filetype off set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'VundleVim/Vundle.vim' Plugin 'wting/rust.vim' Plugin 'racer-rust/vim-racer' Plugin 'scrooloose/nerdTree' "Documents tree Plugin 'davidhalter/jedi-vim' "python autocompletion Plugin 'tpope/vim-fugitive' "git integration Plugin 'scrooloose/syntastic' "code syntaxis Plugin 'Raimondi/delimitMate' "automatic closing of quotes, parenthesis... Plugin 'yggdroot/indentline' "Show indent lines (useful for loops) Plugin 'tmhedberg/SimpylFold' "Python folding Plugin 'vim-airline/vim-airline' Plugin 'vim-airline/vim-airline-themes' Plugin 'ervandew/supertab' "<Tab> for code completion Plugin 'ctrlpvim/ctrlp.vim' "Finder for vim Plugin 'jistr/vim-nerdtree-tabs' Plugin 'ntpeters/vim-better-whitespace' Plugin 'sjl/badwolf' call vundle#end() filetype plugin indent on colorscheme badwolf
That’s how we add Plugins to the vim by writing
Plugin and after that what plugin we want to install. Now to install plugins first type
: and after that type
PluginInstall then press enter and all the plugins will install one by one.
Now vim is looks something like blow image.
Thank you 🙂