Advertisement
Guest User

Untitled

a guest
Apr 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 2.92 KB | None | 0 0
  1.  
  2. colorscheme solarized8
  3.  
  4. set encoding=utf-8
  5. set nocompatible
  6. set backspace=indent,eol,start
  7. set nobackup
  8. set showcmd
  9. set incsearch
  10. set number
  11. set mouse=a
  12. set history=2000
  13. set ruler
  14. set list
  15. set list listchars=tab:·\ ,trail:·
  16. set hlsearch
  17. set modeline
  18.  
  19. set undolevels=128
  20. set undodir=~/.vim/undodir/
  21. set undofile
  22. set undolevels=1000
  23. set undoreload=10000
  24.  
  25. set ts=4
  26. set softtabstop=4
  27. set shiftwidth=4
  28. set noexpandtab
  29.  
  30. " set expandtab
  31. set smarttab
  32. set autoindent
  33. set smartindent
  34.  
  35. set conceallevel=1
  36.  
  37. let g:javascript_conceal_function             = "ƒ"
  38. let g:javascript_conceal_null                 = "ø"
  39. let g:javascript_conceal_this                 = "@"
  40. let g:javascript_conceal_return               = "→"
  41. let g:javascript_conceal_undefined            = "¿"
  42. let g:javascript_conceal_NaN                  = "ℕ"
  43. let g:javascript_conceal_prototype            = "¶"
  44. let g:javascript_conceal_static               = "•"
  45. let g:javascript_conceal_super                = "Ω"
  46. let g:javascript_conceal_arrow_function       = "⇒"
  47. let g:javascript_conceal_noarg_arrow_function = "○"
  48. let g:javascript_conceal_underscore_arrow_function = "🞅"
  49.  
  50.  
  51. "inoremap ( ()<Esc>:let leavechar=")"<CR>i
  52. "inoremap [ []<Esc>:let leavechar="]"<CR>i
  53. "inoremap { {}<Esc>:let leavechar="}"<CR>i
  54.  
  55.  
  56. inoremap ( ()<Esc>i
  57. inoremap [ []<Esc>i
  58. inoremap { {<CR>}<Esc>O
  59. autocmd Syntax html,vim inoremap < <lt>><Esc>i| inoremap > <c-r>=ClosePair('>')<CR>
  60. inoremap ) <c-r>=ClosePair(')')<CR>
  61. inoremap ] <c-r>=ClosePair(']')<CR>
  62. inoremap } <c-r>=CloseBracket()<CR>
  63. inoremap " <c-r>=QuoteDelim('"')<CR>
  64. inoremap ' <c-r>=QuoteDelim("'")<CR>
  65.  
  66. function ClosePair(char)
  67.  if getline('.')[col('.') - 1] == a:char
  68.  return "\<Right>"
  69.  else
  70.  return a:char
  71.  endif
  72. endf
  73.  
  74. function CloseBracket()
  75.  if match(getline(line('.') + 1), '\s*}') < 0
  76.  return "\<CR>}"
  77.  else
  78.  return "\<Esc>j0f}a"
  79.  endif
  80. endf
  81.  
  82. function QuoteDelim(char)
  83.  let line = getline('.')
  84.  let col = col('.')
  85.  if line[col - 2] == "\\"
  86.  "Inserting a quoted quotation mark into the string
  87.  return a:char
  88.  elseif line[col - 1] == a:char
  89.  "Escaping out of the string
  90.  return "\<Right>"
  91.  else
  92.  "Starting a string
  93.  return a:char.a:char."\<Esc>i"
  94.  endif
  95. endf
  96.  
  97. syntax on
  98. filetype plugin indent on
  99.  
  100. function ModeChange()
  101.     if getline(1) =~ "^#!"
  102.         silent !chmod u+x <afile> 2> /dev/null
  103.     endif
  104. endfunction
  105.  
  106. au BufWritePost * call ModeChange()
  107.  
  108. set colorcolumn=80
  109. highlight ColorColumn ctermbg=darkgray
  110.  
  111. map re :redo<CR>
  112. map te :tabe .<CR>
  113. map gb :tabp<CR>
  114. map cd :colorscheme default<CR>
  115.  
  116. execute pathogen#infect()
  117.  
  118. " augroup javascript_folding
  119. "    au!
  120. "    au FileType javascript setlocal foldmethod=syntax
  121. " augroup END
  122.  
  123. "augroup filetypedetect
  124. "   au! BufRead,BufNewFile *.plhtml setfiletype perl
  125. "   au! BufRead,BufNewFile *.cgi    setfiletype perl
  126. "augroup end
  127.  
  128.  augroup vimrc
  129.     autocmd!
  130.     autocmd ColorScheme * hi SpecialKey ctermfg=06
  131.  augroup END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement