Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Fzf | 52,628 | 8 | 5 | 9 hours ago | 62 | April 17, 2021 | 321 | mit | Go | |
:cherry_blossom: A command-line fuzzy finder | ||||||||||
Vim | 30,412 | 41 minutes ago | 1,493 | August 31, 2022 | 1,462 | vim | Vim Script | |||
The official Vim repository | ||||||||||
Learn Vim | 11,420 | a month ago | 11 | other | ||||||
Learning Vim and Vimscript doesn't have to be hard. This is the guide that you're looking for 📖 | ||||||||||
Fzy | 2,761 | 3 days ago | 7 | December 06, 2019 | 48 | mit | C | |||
:mag: A simple, fast fuzzy finder for the terminal | ||||||||||
Dotfiles | 1,682 | 4 days ago | 6 | cc0-1.0 | Shell | |||||
▒ rice ░░ custom linux config files | ||||||||||
Vim Eunuch | 1,648 | 8 months ago | Vim Script | |||||||
eunuch.vim: Helpers for UNIX | ||||||||||
Ipt | 840 | 9 | 14 | 3 months ago | 18 | February 07, 2021 | 6 | mit | JavaScript | |
Interactive Pipe To: The Node.js cli interactive workflow | ||||||||||
Vim | 526 | 5 years ago | 13 | C | ||||||
Port of the Vim text editor to the iOS | ||||||||||
Workshops | 370 | a year ago | 6 | other | Jupyter Notebook | |||||
lecture notes for cyberwizard workshops | ||||||||||
Dotfiles | 318 | 19 days ago | gpl-3.0 | Lua | ||||||
My dotfiles: Experimental, ongoing configuration files, development environment and scripts for various Unix-like systems, text-based command-line applications and interfaces. |
Some of the settings here may reference a 'leader' key, use:
let mapleader="{Your Key Of Choice}"
Enables syntax highlighting, why wouldn't you?
syntax on
Shows you line numbers, it's great:
set number
Copy and paste from the system clipboard, and avoid indentation issues:
noremap <leader>y "+y
noremap <leader>p "+p
Makes the backspace key behave like you'd expect, and go through EVERYTHING:
set backspace=indent,eol,start
Makes 1 tab = 4 spaces:
set shiftwidth=4
set tabstop=4
Convert tabs to spaces:
set expandtab
Always try to show 10 lines above and below the cursor location:
set scrolloff=10
Allows you to switch between buffers without saving EVERY TIME:
set hidden
Case insensitive in command-line
mode:
set wildignorecase
Change to the correct indention and plugins dependent on the file type
filetype on
filetype indent on
filetype plugin on
" or one line alternative
filetype plugin indent on
Visually select the entire file:
ggVG
Search for the word under the cursor (forward):
*
Search for the word under the cursor (backward):
#
Re-run the last command-line
command:
@:
Alternative to Esc
:
<C-[>
Paste the content of register and fix the indent:
<C-r><C-p><vim-register>
" for example: <C-r><C-p>+ (paste clipboard content into vim)
Delete until the beginning of recently added word:
<C-w>
Delete until the beginning of where entering insert mode:
<C-u>
Add/minus number for each matching line:
g<C-a> " add one number
g<C-x> " minus one number
" for example:
" select the number below using Visual block command:
" 0
" 0
" 0
" if we use g<C-a>, then those three line will become:
" 1
" 2
" 3
Reads and inserts the contents of a file at the current line:
:r {your file name}
Reads and inserts the output of a shell command at the current line:
:r! {your shell command, eg: ls}
Find and replace "foo" with "bar" through whole file!
:%s/foo/bar/g
Move visual selection up and down a line:
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv
Quickly re-select either the last pasted or changed text:
noremap gV `[v`]
Run the recorded macro on a range of lines:
" Credit goes to https://github.com/stoeffel/.dotfiles/blob/master/vim/visual-at.vim
xnoremap <silen> @ :<C-u>echo "@".getcmdline() | execute ":\'<,\'>normal @" . nr2char(getchar())<CR>
Format a paragraph or visual selection to 80 character lines:
" Taken from: https://github.com/nickjj/dotfiles/blob/599f90a959f58c4ba3b771c9d933f2eeb83eef94/.vimrc#L305
nnoremap <Leader>g gqap
xnoremap <Leader>g gqa
If you use command mode a lot, swapping the colon and semi-colon keys means 1 less keypress:
nnoremap ; :
nnoremap : ;
Write to and exit the file, behaves like :wq
:
ZZ
Exit without saving, behaves like :q!
:
ZQ
Run the current line as a command:
:<Ctrl-r> <Ctrl-l>
Allows the cursor to move up and down naturally by display, lines instead of file lines:
nnoremap j gj
nnoremap k gk
Make yanking with capital Y behave like the other capital letters, and yank until the end of the line:
nnoremap Y y$
Press space to go down 10 lines, control + space to go up 10 lines:
noremap <Space> 10j
noremap <C-Space> 10k
" if there's an issue with ctrl-space, you can use <[email protected]> or <Nul>
" Ref: https://stackoverflow.com/a/24983736
noremap <[email protected]> 10k
Press space twice to switch between your last two buffers, use it all the time for superfast switching:
nnoremap <leader><leader> <c-^>
Switch buffers with Left and Right arrow keys:
nnoremap <left> :bp<cr>
nnoremap <right> :bn<cr>
Search for foo throughout file (press n for next, N for previous):
/foo
Searching ignores case unless an upper case letter is present in the query:
set ignorecase smartcase
Begin searching while typing, highlighting matches:
set incsearch hlsearch
Press your 'leader' key + enter to clear search highlighting:
nnoremap <silent> <leader><CR> :noh<CR>
Description | Prepend | Example |
---|---|---|
Normal mode command | (nothing) | :help x |
Visual mode command | v_ | :help v_u |
Insert mode command | i_ | :help i_META |
Command-line command | : | :help :quit |
Option | ' | :help 'textwidth' |
Command-line editing | c | :help c_<BS> |
Vim command argument | - | :help -r |
Search flags | / | :help /\U |
Substitution flags | s/ | :help s/\& |
A fuzzy-finder to easily search for files, contents & buffers:
Provides mappings to easily delete, change and add parentheses, brackets, quotes, and tags:
An integrated git experience in vim, that's "so awesome, it should be illegal":
Vim like navigation of file system using buffers.
Most of the settings here require a prefix key, use this to set it, or keep it as ctrl+b, it's your life ;)
unbind C-b
set -g prefix {Your Key Of Choice}
Tmux Windows start from 1, so no big reaches ;)
set -g base-index 1
Makes keys register instantly, you may notice escape delays in vim without this:
set -s escape-time 0
Prefix+c will open a new tmux session in your current directory:
bind c new-window -c "#{pane_current_path}"
Renumber windows sequentially after closing any of them:
set -g renumber-windows on
Enable mouse, it's sometimes nice for scrolling:
set -g mode-mouse on
Increase scroll-back history, so you can see more:
set -g history-limit 10000
Installing TPM (Tmux plugin manager):
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
A set of tmux options that should be acceptable to everyone. tmux-sensible
Gives you more customization over your shell
Install:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Add to zshrc:
ZSH=~/.oh-my-zsh
Auto-complete shell commands, it's cool:
Highlight your current command, lets you know what's going on: