Advertisement
JortDev

.vimrc

Nov 27th, 2019
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 1.80 KB | None | 0 0
  1. " windows specific settings:
  2.  
  3. " enable syntax highlighting
  4. syntax on
  5.  
  6. " recognize ascript as javascript syntax
  7. au BufReadPost *.as set syntax=javascript
  8.  
  9. "auto indent in if statements etc
  10. :set smartindent
  11.  
  12. " auto copy selection (to clipboard)
  13. :set guioptions+=a
  14.  
  15. " enable backspace in insert mode
  16. set backspace=2
  17. set backspace=indent,eol,start
  18.  
  19. " set font
  20. if has("gui_running")
  21.   if has("gui_gtk2")
  22.     set guifont=Inconsolata\ 12
  23.   elseif has("gui_macvim")
  24.     set guifont=Menlo\ Regular:h14
  25.   elseif has("gui_win32")
  26.     set guifont=Consolas:h11:cANSI
  27.   endif
  28. endif
  29.  
  30.  
  31.  
  32. " timestamp map
  33. nmap <F2> i<C-R>=strftime("//j9 @ %Y-%m-%d: ")<CR><Esc>
  34. imap <F2> <C-R>=strftime("//j9 @ %Y-%m-%d: ")<CR>
  35.  
  36. " line break map
  37. nmap <F3> i<C-R>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<CR><Esc>
  38. imap <F3> <C-R>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<CR>
  39.  
  40. "fill line function
  41. map <F12> 180A/<Esc>d180|
  42.  
  43. set packpath+=~/.vim/pack/
  44. set t_Co=256   " This is may or may not needed.
  45.  
  46. set background=light
  47. " line numbers
  48. set number
  49. " status bars
  50. set laststatus=2
  51. " use x clipboard
  52. set clipboard=unnamedplus
  53.  
  54. "
  55. set relativenumber
  56. " cursor scrolls
  57. set mouse=a
  58. " keep folds
  59. autocmd BufWinLeave *.* mkview
  60. autocmd BufWinEnter *.* silent loadview
  61.  
  62. " write file with root permissions: w!!
  63. cmap w!! w !sudo tee > /dev/null %et ignorecase
  64.  
  65. " disable sound error
  66.  
  67. " flash screen on error
  68. " set visualbell
  69.  
  70. " disable error sound
  71. set noerrorbells
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement