Guest User

Untitled

a guest
Nov 20th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. """""""""""""""""""""""""""
  2. "--- GENERAL SETTINGS ---"
  3. """""""""""""""""""""""""""
  4. scriptencoding utf-8
  5. set enc=utf-8
  6. set fileencoding=utf-8
  7. set fileencodings=ucs-bom,utf8,prc
  8.  
  9. set tabstop=4
  10. set shiftwidth=4
  11. set softtabstop=4 "set Tabvalue=4"dd
  12. set ruler "always show actual position"
  13. set nu "side indexnunbers"
  14. set history=1000
  15. set undolevels=1000
  16. set noswapfile "disable creating stupid .swp files"
  17. set nobackup
  18. set nowritebackup
  19. set autoindent
  20. set title "sets filename on top of the open window"
  21. set wildmenu "sets the autocomplete in commandline"
  22. set showmode "shows the actual mode"
  23. set mouse=a "enables Mouse in vim"
  24. set clipboard=unnamed "use the system clipboard for copying and pasting
  25.  
  26. set showcmd "show partial commands in status line and
  27. "selected characters/lines in visual mode"
  28. set showmatch "show matching brackets/parenthesis
  29. set incsearch "find as you type search"
  30. set hlsearch "highlights searched objects"
  31.  
  32. set expandtab "set tabs to spaces
  33. set list listchars=tab:-\ \,trail:· "set points after
  34. let mapleader = "," "creates mapleader do do more key combinations
  35. let g:mapleader = ","
  36.  
  37. "clearing highlighted search
  38. nmap <silent> <leader>/ :nohlsearch<CR>
  39.  
  40. "enables codefolding"
  41. set foldmethod=indent
  42. set foldnestmax=10
  43. set foldcolumn=2
  44. set nofoldenable
  45. set foldlevel=1
  46.  
  47. "soft wrap and indent lines
  48. set breakindent
  49. set showbreak=\
  50.  
  51. " scroll down with five lines visible
  52. set scrolloff=5
  53.  
  54. " show the numbers od lines
  55. "set relativenumber
  56.  
  57. "enables syntax detection"
  58. syntax on
  59.  
  60. "colorscheme"
  61. set t_Co=256
  62. " colorscheme monokai
  63. colorscheme badwolf
  64.  
  65. " set to autoread if a file is changed from the outside
  66. set autoread
  67.  
  68. " disable the fucking sounds
  69. set visualbell
  70. set noerrorbells
  71.  
  72. """"""""""""""""""""
  73. "--- REMAPPINGS ---"
  74. """"""""""""""""""""
  75. " options for key remapping
  76. " <Esc> Escape key
  77. " <C-G> CTRL-G
  78. " <Up> cursor up key
  79. " <C-LeftMouse> Control- left mouse click
  80. " <S-F11> Shifted function key 11
  81. " <M-a> Meta- a ('a' with bit 8 set)
  82. " <M-A> Meta- A ('A' with bit 8 set)
  83. " <t_kd> "kd" termcap entry (cursor down key)
  84.  
  85. " switch to insert mode when typing 'jk' in insert mode
  86. " best map EVER
  87. inoremap jk <esc>
  88.  
  89. " temporarily disable escape and cursor keys key
  90. inoremap <esc> <nop>
  91. map <up> <nop>
  92. map <down> <nop>
  93. map <left> <nop>
  94. map <right> <nop>
  95.  
  96. " movement
  97. nmap H 0
  98. vmap H 0
  99. nmap L $
  100. vmap L $
  101.  
  102. "Stupid shift key fixes & helper"
  103. cmap X x
  104. cmap W w
  105. cmap Q q
  106. cmap WQ wq
  107. cmap wQ wq
  108. cmap Tabe tabe
  109. cmap qq q!
  110. cmap xx x!
  111. cmap ww w!
  112.  
  113. " faster mapping to get into normal mode
  114. vmap ; :norm
  115.  
  116. "Yank from the cursor to the end of the line, to be consistent with C and D"
  117. nnoremap Y y$
  118.  
  119. "pane switching done easily
  120. nmap <tab> <C-w><C-w>
  121.  
  122. " center current search result
  123. nmap n nzz
  124. nmap N Nzz
Add Comment
Please, Sign In to add comment