Last active
November 17, 2015 13:00
-
-
Save igorparrabastias/4062dd2a4d7610ab0cf1 to your computer and use it in GitHub Desktop.
Linux/Bash Commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Display the path of the current file at bottom in Vim | |
# .vimrc | |
set laststatus=2 | |
set statusline+=#F | |
# Install full version of Vim in Ubuntu | |
sudo apt-get remove vim-tiny | |
sudo apt-get install vim | |
# Color command line with git branch | |
# .bashrc | |
source ~/.bash_git | |
PS1='\n\[\e[1;37m\]|-- \[\e[1;32m\]\u\[\e[0;39m\]@\[\e[1;36m\]\h\[\e[0;39m\]:\[\e[1;33m\]\w\[\e[0;39m\]\[\e[1;35m\]$(__git_ps1 " (%s)")\[\e[0;39m\] \[\e[1;37m\]--|\[\e[0;39m\]\n$ ' | |
# Get colors in 'less'' command | |
Use view instead of less. It opens the file with vim in readonly mode. | |
It's practically a coloured less: a pager where you can search with / (and more). The only drawback is that you can't exit with q but you need :q | |
Also, you get the same colouring as vim (since you're in fact using vim). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment