Skip to content

Instantly share code, notes, and snippets.

@urigoren
Last active Apr 8, 2021
Embed
What would you like to do?
nnoremap <F4> :set hlsearch! nohlsearch?<CR>
imap <F4> <C-O><F4>
nnoremap <F2> :let @/="qoXouQoz"<CR>:set invpaste paste?<CR>
set pastetoggle=<F2>
nnoremap <silent> <F3> :let @/ .= '\\|\<'.expand('<cword>').'\>'<cr>n
nnoremap <buffer> <F5> :w<cr>:exec '!/usr/bin/python3' shellescape(@%, 1)<cr>
nnoremap <buffer> <F6> :w<cr>:exec '!/usr/local/bin/spark-submit' shellescape(@%, 1)<cr>
syntax on
nnoremap 0 $
nnoremap 9 0
inoremap <C-A> <Home>
inoremap <C-E> <End>
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
nnoremap <Tab> >>_
nnoremap <S-Tab> <<_
inoremap <S-Tab> <C-D>
vnoremap <Tab> >gv
vnoremap <S-Tab> <gv
nmap <S-Up> v<Up>
nmap <S-Down> v<Down>
nmap <S-Left> v<Left>
nmap <S-Right> v<Right>
vmap <S-Up> <Up>
vmap <S-Down> <Down>
vmap <S-Left> <Left>
vmap <S-Right> <Right>
imap <S-Up> <Esc>v<Up>
imap <S-Down> <Esc>v<Down>
imap <S-Left> <Esc>v<Left>
imap <S-Right> <Esc>v<Right>
nnoremap <c-z> :u<CR>
inoremap <c-z> <c-o>:u<CR>
set showcmd
set showmatch
set showmode
set cursorline
set nolazyredraw
set encoding=utf8

Vim Modifications:

  1. End and Home keys work as expected:
  2. F2 = paste mode
  3. F3 = search word under cursor
  4. F4 = Highlight mode
  5. F5 = run in python
  6. F6 = run in spark
  7. Tab and Shift+Tab do indentations
  8. Ctrl+Z = undo
@urigoren

This comment has been minimized.

Copy link
Owner Author

@urigoren urigoren commented Jun 4, 2018

Get this vim config with:

curl -L http://goren.ml/vim > ~/.vimrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment