====== vim ======
{{ :tudasbazis:linux:vi_sheet.png?400 |VI Cheat Sheet}}
===== Config =====
"""Others"""
set title
set showmode
set ttyfast
set wildchar=
set softtabstop=4
set shiftwidth=4
set tabstop=4
set smartindent
set paste
set ignorecase
set hlsearch
set incsearch
set showmatch
set expandtab
"""Show Position"""
set numberwidth=3
"set number
set ruler
"""Highlight"""
colo default
set background=dark
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
highlight WhitespaceEOL term=reverse ctermbg=Red guibg=Red
match WhitespaceEOL /\s\+$/
set colorcolumn=120
"""File types"""
syntax on
filetype plugin on
au BufNewFile,BufRead *.zts set filetype=python
au BufNewFile,BufRead hosts.local set filetype=python
""""Shortcuts"""
nnoremap :! clear; PROMPT_EXTRA='[VIM]' /bin/bash
nnoremap :set filetype=python
"""Trailing whitespaces"""
autocmd bufwritepre * let save_cursor = getpos( '.' ) |
\ silent %s/[ \t]\+$//ge |
\ silent %s/\n*\%$//e |
\ call setpos( '.', save_cursor )
===== Fájltípus kierőszakolása =====
:set filetype=javascript