Skip to content

Instantly share code, notes, and snippets.

@mkrasowski
Last active October 1, 2024 22:25
Show Gist options
  • Save mkrasowski/a2bd2bedbe185decca64e425ca82380b to your computer and use it in GitHub Desktop.
Save mkrasowski/a2bd2bedbe185decca64e425ca82380b to your computer and use it in GitHub Desktop.
Useful initial remote shell terminal configuration
export HISTCONTROL="erasedups"
export HISTSIZE=10000
set guifont=GohuFont\ 8
set lines=60
set columns=180
set guioptions-=T
set guioptions-=m
colorscheme twilight
set listchars=tab:»-,trail:·,nbsp:¬
escape ^aa
startup_message off
vbell on
msgwait 2
defscrollback 5000
defutf8 on
shell bash
shelltitle "$ |terminal"
hardstatus alwayslastline "%{= w}%-w%{= Bk} %n %t %{-}%+w %-="
" general
syntax on
set noerrorbells
set nostartofline
set showcmd
set showmatch
set laststatus=2
set splitright
" searching
set hlsearch
set ignorecase
set smartcase
set incsearch
set completeopt=menu,preview,longest
set scrolloff=1
" encoding / file format
set fileencodings=utf-8,cp1250,default,latin1,ucs-bom
set fileformats=unix,dos,mac
" formating
set smartindent
set autoindent
set expandtab
set cpoptions+=%
set tabstop=8
set shiftwidth=4
set softtabstop=4
set matchpairs+=<:>
" display
set nowrap
set number
set numberwidth=5
set ruler
set cursorline
set list
set listchars=tab:>-,trail:.
set mousehide
colorscheme delek
" autocmd / triggers
" vimdiff
set diffopt+=iwhite
" sessions
set sessionoptions=buffers,curdir,folds,localoptions,tabpages
" mappings
" '*' in visual mode searches for selected text
vnoremap * y/<C-r>"<CR>
" ctrl+space for autocomplete
inoremap <C-space> <C-x><C-n>
" center cursor position after paging up or down
noremap <PageUp> <PageUp>M
noremap <PageDown> <PageDown>M
" leader+p - paste in selection without replacing "-buffer
vnoremap <Leader>p "_dP
" ==== plugins =====
" local vimrc
let g:localvimrc_ask=0
" fuzzy finder
let g:fuf_modesDisable = [ 'mrufile', 'mrucmd', 'line', 'dir', 'bookmarkfile', 'bookmarkdir', 'buffertag', 'line', 'help', 'jumplist' ]
let g:fuf_keyOpen = '<C-l>'
let g:fuf_keyOpenTabpage = '<CR>'
" vcs
let g:VCSCommandDeleteOnHide = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment