Last active
February 24, 2021 10:34
-
-
Save anisyanka/15dd5a5664509407b4f7c063b9fcaafe to your computer and use it in GitHub Desktop.
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
" See https://www.youtube.com/watch?v=XA2WjJbmmoM | |
" BASIC SETUP: | |
" enter the current millenium | |
set nocompatible | |
" enable syntax and plugins | |
syntax enable | |
filetype plugin on | |
" lines number | |
set number | |
" make the backspace work | |
set backspace=indent,eol,start | |
" FINDING FILES | |
" Search down into subfolers | |
" Provedes tab-completion for all file-related tasks (for instance :find <name>) | |
set path+=** | |
" Display all matching files when we tab complete | |
set wildmenu | |
" NOW WE CAN: | |
" - Hit tab to :find by partial match | |
" - Use * to make it fuzzy | |
" THINGS TO CONSIDER: | |
" - :b lets you autocomplete any open buffer | |
" TAG JUMPING: | |
" Create the `tags` file (may need to install ctags first) | |
command! MakeTags !ctags -R . | |
" NOW WE CAN: | |
" - Use ^] to jump to tag under cursor | |
" - Use g^] for ambiguous tags | |
" - Use ^t to jump back up the tag stack | |
" THINGS TO CONSIDER: | |
" - This doesn't help if you want a visual list of tags | |
" AUTOCOMPLETE: | |
" The good stuff is documented in |ins-completion| | |
" HIGHLIGHTS: | |
" - ^x^n for JUST this file | |
" - ^x^f for filenames (works with our path trick!) | |
" - ^x^] for tags only | |
" - ^n for anything specified by the 'complete' option | |
" NOW WE CAN: | |
" - Use ^n and ^p to go back and forth in the suggestion list | |
" FILE BROWSING: | |
" Tweaks for browsing | |
let g:netrw_banner=0 " disable annoying banner | |
let g:netrw_browse_split=4 " open in prior window | |
let g:netrw_altv=1 " open splits to the right | |
let g:netrw_liststyle=3 " tree view | |
let g:netrw_list_hide=netrw_gitignore#Hide() | |
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' | |
" NOW WE CAN: | |
" - :edit a folder to open a file browser | |
" - <CR>/v/t to open in an h-split/v-split/tab | |
" - check |netrw-browse-maps| for more mappings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment