Last active
April 1, 2021 14:21
-
-
Save speg/93ade9c93707bf1246d841b868474e51 to your computer and use it in GitHub Desktop.
tabs with shift
This file contains 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
syntax enable | |
set expandtab | |
set shiftwidth=4 | |
set tabstop=4 | |
set showmode | |
set showcmd | |
set wildmenu "Enhanced command line completion | |
set ruler | |
set autoindent | |
set nowrap | |
set hlsearch "When there is a previous search pattern, highlight all its matches | |
set incsearch "Highlight matches while searching | |
set showmatch "Jump to matching bracket | |
set ignorecase | |
set smartcase | |
set exrc "Search current directory for VIM config file | |
set secure "No :autocmd, shell and write commands in config files | |
set laststatus=2 " Always show status line | |
set wildignore+=**/venv/** "Ignored when searching for files | |
set path+=**/* | |
"Lets try and make some custom mappings. | |
let c='a' | |
while c <= 'z' | |
exec "set <M-".tolower(c).">=\e".c | |
exec "imap \e".c." <M-".tolower(c).">" | |
let c = nr2char(1+char2nr(c)) | |
endw | |
"Easier tabs - all tab things will be managed through the SHIFT key, T for new, Q close, [] prev, next | |
map <S-T> :tabnew<Space> | |
map <S-Q> :w<CR>:tabclose<CR> | |
map <S-]> :tabnext<CR> | |
map <S-[> :tabprevious<CR> | |
map <A-W> <C-W>J | |
map <Leader>f :tab :find<Space> | |
map <Leader>e :Lexplore<CR>:vertical resize 22<CR>gh | |
map <Leader>l :copen<CR> | |
map [[ ?class\\|def<CR> | |
map ]] /class\\|def<CR> | |
nnoremap <Space><Space> <C-d> | |
"Use Ag for searching | |
if executable('ag') | |
set grepprg=ag\ --nogroup\ --nocolor\ --column " Note we extract the column as well as the file and line number | |
set grepformat=%f:%l:%c%m | |
endif | |
" hide netrw banner and display in tree mode | |
let g:netrw_liststyle= 3 | |
let g:netrw_banner= 0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment