Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- "" .vimrc // yunga.palatino@gmail.com
- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- """" Global settings
- """"
- set nocompatible " no Vi Compatibility
- set ttyfast " fast terminal connection
- "" Files Syntax/Plugins
- syntax enable
- filetype plugin indent on " file type detection, plugins, indent
- "" Search/Replace
- set nowrapscan " no wrap around for search command
- set incsearch " incremental search
- set ignorecase " search are case insensitive
- set smartcase " unless pattern contain uppercase letters
- set hlsearch " highlight searches
- set showmatch " show match for corresponding brackets
- set gdefault " always subsitute all occurence on a line
- "" Scrolling
- set nowrap " dont wrap long lines
- set scrolljump=8 " number of lines to scroll at a time
- set scrolloff=4 " number of lines to show around cursor
- set sidescrolloff=32 " number of columns to scroll at a time
- "" Display
- set title " try to set xterm title to current file
- set titlestring=VIM:\ %F\ %m%h%w%y%r
- set titleold="" " restore old title on exit
- set statusline=%<[%02n]\ %F%(\ %m%h%w%y%r%)\ [%{&fo}]\ %a%=\ %8l,%c%V/%L\ (%P)\ [%08O:%02B]
- set laststatus=2 " always keep the status line
- set showcmd " show command in status line
- set cmdheight=2 " command line height
- set shortmess=atToOI " Flags for short messages
- set report=0 " Always report changes
- set wildmode=list:longest,list:full " enable command completion
- set wildmenu " display possible completions in menu
- set number " show line numbers
- set ruler " show cursor position
- set cursorline " highlight cursor line
- " Edit
- set autoindent " keep the same indent for new lines
- set smartindent " (un)indent in regards to { and }
- set history=100 " number of :cmd to keep in history
- set virtualedit=all " allow cursor to go anywhere
- set backspace=indent,eol,start " backspace and cursor keys wraps to previous/next line
- set whichwrap=b,s,<,>,[,] " backspace, space, left, right wraps to prev/next line
- set undofile
- "" Spaces
- set noexpandtab " don't convert tab to spaces
- set tabstop=4 " tabs are 4 spaces (ts and sw, see 3 in tabstop help)
- set shiftwidth=4
- set lazyredraw " lazy redraw while executing macros
- "" Mouse
- set mouse=a " enable mouse in all edit modes
- set mousemodel=popup_setpos " right mouse button show menu
- "" Files/Buffers
- " set fileformat=unix " default format to use
- set fileformats=unix,dos,mac " what to look for auto convertion
- set encoding=utf-8 " bye bye ascii
- set backup " always keep a backup of modified files
- set backupext=.bak " append .bak to backups filenames
- set backupcopy=yes " preserve inodes
- set hidden " dont unload buffers when not in a window
- "" Completion
- set wildmode=longest,full " show the
- set wildmenu " enhanced command completion
- set wildcharm=<C-Z> " ctrl-p/n for completion
- colorscheme solarized " note: blue/delek/slate/torte in tty
- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- """" Functions
- """"
- """"""""
- "" Rotate tabstop value between 2, 4, 8, 16, 32 and 64
- "" Mapped to <F2>
- ""
- function My_TabToggle ()
- let TabStopVal = &tabstop
- let TabStopVal = TabStopVal * 2
- if TabStopVal > 64
- let TabStopVal = 2
- endif
- let &tabstop = TabStopVal
- echo"TabStop is now: " TabStopVal
- endfunction
- """"""""
- "" Load the default menu (from the user-manuali/gui.txt)
- "" Mapped to <F9>
- source $VIMRUNTIME/menu.vim
- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- """" Mappings
- """"
- map <F11> :bprevious<CR>
- map <F12> :bnext<CR>
- map <F2> :call My_TabToggle()<CR>
- map <F9> :emenu <C-Z>
- " relativenumber
- " ctrl w
- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- """" AutoCommands
- """"
- "" always jump to the last known cursor position if it is valid
- autocmd BufReadPost *
- \ if line("'\"") > 0 && line("'\"") <= line("$") |
- \ exe "normal g`\"" |
- \ endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement