Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmap w!! %!sudo tee > /dev/null %
- nnoremap <a-j> :m+<CR>==
- nnoremap <A-k> :m-2<CR>==
- nnoremap <A-h> <<
- nnoremap <A-l> >>
- noremap <A-j> <Esc>:m+<CR>==gi
- inoremap <A-k> <Esc>:m-2<CR>==gi
- inoremap <A-h> <Esc><<]a
- inoremap <A-l> <Esc>>>]a
- vnoremap <A-j> :m'>+<CR>gv=gv
- vnoremap <A-k> :m-2<CR>gv=gv
- vnoremap <A-h> <gv
- vnoremap <A-l> >gv
- cd ~/Documents/Forritun/Python
- "remove trailing whitespace? map þetta: %s/\s\+$//ge
- "set clipboard=unnamedplus,autoselect " Use + register (X Window clipboard) as unnamed register
- set ofu=syntaxcomplete#Complete
- set nocompatible "Do not use archaic vi settings.
- set history=700 "Remember 700 changes (?).
- set ignorecase "Ignore case when searching.
- set smartcase "Ignore case unless it's uppercase.
- set incsearch "Use incremental search
- set ruler "Always show cursor position.
- set ttyfast "Smooth changes (?).
- set expandtab "No 'real' tab.
- set noerrorbells "No sound on errors.
- set novisualbell "No visual warning on errors.
- set t_vb= "(?).
- set tm=500 "(?).
- set showcmd "Show the command being typed.
- set mousehide "Hide the mouse while typing.
- set cursorcolumn "Highlight the column of the cursor.
- set cursorline "Higlight the row of the cursor.
- set colorcolumn=80
- "set virtualedit=onemore "Allow the cursor to go one behind the last symbol.
- set listchars=tab:>-,trail:- "Show tabs and trailing (?).
- set nobackup "No backups.
- set noswapfile "No swap files.
- set nowb "(?).
- set number "Show line numbers.
- set numberwidth=4 "Width doesn't change unless the file is >9999 lines.
- set tabstop=8 "(?).
- set softtabstop=4 "(?).
- set shiftwidth=4 "(?).
- set scrolloff=3 "Do not move the cursor above/below this threshold.
- set undofile "Create undo files to undo/redo after reopening files.
- set wildmenu "For tab completion when searching.
- set wildmode=list:longest "Same as above. Tab completion,
- "set list
- "set listchars=tab:▸\ ,eol:¬ "For visibility.
- "set listchars=tab:»·,nbsp:·
- "set autowrite "Automatically write (save).
- set autoindent "Use autoindent.
- set pastetoggle=<F12> "To work around the autoindent.
- set textwidth=79 "For Python.
- set lines=67 "Show as many as possible.
- set columns=83 "To show 79 characters + 4 number spaces.
- "set columns=166 "To show 79 characters + 4 number spaces.
- "set scrollbind
- ":noremap <silent> <Leader>vs :<C-u>let @z=&so<CR>:set so=0 noscb<CR>:bo vs<CR>Ljzt:setl scb<CR><C-w>p:setl scb<CR>:let &so=@z<CR>
- syntax enable "Enable syntax highlighting.
- winpos 0 24 "Adjust to the edge of the screen.
- filetype indent plugin on "Enable the filetype indent plugin.
- set background=dark "Use a dark background by default.
- set t_Co=16 "Use 16 colors.
- let g:solarized_termcolors=16 "Use 16 colors.
- colorscheme solarized "Use the Solarized colorscheme.
- au FocusLost * :wa
- map <up> :set number<CR>
- map <down> :set relativenumber<CR>
- map <left> :set background=light<CR>
- map <right> :set background=dark<CR>
- map <F4> :w<CR>
- map <F3> :silent! %s/\s+$//<CR>:retab<CR>
- imap <F4> <ESC>:w<CR>
- map <F5> :!python %<CR>
- map K <nop>
- "map <space> ^
- noremap <space> :
- imap <up> <nop>
- map K i'<esc>ea'<esc>b
- imap <down> <nop>
- imap <left> <nop>
- imap <right> <nop>
- imap <S-'> <'><'><left>
- "imap jj <ESC>
- "imap ( ():<left><left>
- "inoremap <Esc> <Esc>`^
- autocmd BufReadPre *.doc set ro
- autocmd BufReadPre *.doc set hlsearch!
- autocmd BufReadPost *.doc %!antiword "%"
- "au CursorHoldI * stopinsert
- "set updtatetime 2000
- function! PulseCursorLine()
- let current_window = winnr()
- windo set nocursorline
- execute current_window . 'wincmd w'
- setlocal cursorline
- redir => old_hi
- silent execute 'hi CursorLine'
- redir END
- let old_hi = split(old_hi, '\n')[0]
- let old_hi = substitute(old_hi, 'xxx', '', '')
- hi CursorLine guibg=#2a2a2a ctermbg=233
- redraw
- sleep 20m
- hi CursorLine guibg=#333333 ctermbg=235
- redraw
- sleep 20m
- hi CursorLine guibg=#3a3a3a ctermbg=237
- redraw
- sleep 20m
- hi CursorLine guibg=#444444 ctermbg=239
- redraw
- sleep 20m
- hi CursorLine guibg=#3a3a3a ctermbg=237
- redraw
- sleep 20m
- hi CursorLine guibg=#333333 ctermbg=235
- redraw
- sleep 20m
- hi CursorLine guibg=#2a2a2a ctermbg=233
- redraw
- sleep 20m
- execute 'hi ' . old_hi
- windo set cursorline
- execute current_window . 'wincmd w'
- endfunction
- function! ToggleMinimap()
- if exists("s:isMini") && s:isMini == 0
- let s:isMini = 1
- else
- let s:isMini = 0
- end
- if (s:isMini == 0)
- " save current visible lines
- let s:firstLine = line("w0")
- let s:lastLine = line("w$")
- " resize each window
- " windo let w=winwidth(0)*12 | exe "set winwidth=" . w
- " windo let h=winheight(0)*12 | exe "set winheight=" . h
- " don't change window size
- let c = &columns * 12
- let l = &lines * 12
- exe "set columns=" . c
- exe "set lines=" . l
- " make font small
- set guifont=ProggyTiny:h1
- " highlight lines which were visible
- let s:lines = ""
- for i in range(s:firstLine, s:lastLine)
- let s:lines = s:lines . "\\%" . i . "l"
- if i < s:lastLine
- let s:lines = s:lines . "\\|"
- endif
- endfor
- exe 'match Visible /' . s:lines . '/'
- hi Visible guibg=lightblue guifg=black term=bold
- else
- set guifont=Menlo:h12
- hi clear Visible
- endif
- endfunction
- command! ToggleMinimap call ToggleMinimap()
- noremap m :ToggleMinimap<CR>
Add Comment
Please, Sign In to add comment