Repository where I mostly put random python scripts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
2.4 KiB

  1. " sets spell check to be enabled to files which
  2. " end with either .md or .txt
  3. "
  4. " To get auto complete type z= when you are
  5. " over the word.
  6. autocmd BufRead,BufNewFile *.md setlocal spell spelllang=en_us
  7. autocmd BufRead,BufNewFile *.txt setlocal spell spelllang=en_us
  8. """ Indentation and Tabs """
  9. "file based indentation
  10. filetype plugin indent on
  11. "copy indentation from current line when making a new line
  12. set autoindent
  13. " Smart indentation when programming: indent after {
  14. set smartindent
  15. set tabstop=4 " number of spaces per tab
  16. set expandtab " convert tabs to spaces
  17. set shiftwidth=4 " set a tab press equal to 4 spaces
  18. """ Looks and Appearance"""
  19. " Enable syntax highlighting
  20. syntax enable
  21. " Enable 256 colors palette in Gnome Terminal
  22. if $COLORTERM == 'gnome-terminal'
  23. set t_Co=256
  24. endif
  25. try
  26. colorscheme desert
  27. catch
  28. endtry
  29. set background=dark
  30. " Set extra options when running in GUI mode
  31. if has("gui_running")
  32. set guioptions-=T
  33. set guioptions-=e
  34. set t_Co=256
  35. set guitablabel=%M\ %t
  36. endif
  37. " File Encodings
  38. " Set utf8 as standard encoding and en_US as the standard language
  39. set encoding=utf8
  40. " Use Unix as the standard file type
  41. set ffs=unix,dos,mac
  42. " Productivity
  43. " Set Line Numbers to show
  44. set number
  45. " Highlights the current line with a underscore
  46. set cursorline
  47. " Displays a red bar at 80 characters
  48. set colorcolumn=80
  49. " Shows a auto complete tab when you are typing a command
  50. " like :sp <tab>
  51. set wildmenu
  52. " sets the size of the status bar at bottom to have a height of two
  53. set laststatus=2
  54. " Searching when in command mode type /words to find
  55. " search as characters are entered
  56. set incsearch
  57. " highlight matched characters
  58. set hlsearch
  59. " Ignore case when searching
  60. set ignorecase
  61. "Disable ding sound on error, flashes cursor instead
  62. set visualbell
  63. " Display ruler on bottom right -- should be there by default
  64. set ruler
  65. " Enables mouse support
  66. set mouse=a
  67. " Auto updates file if an external source edits the file
  68. set autoread
  69. " Improves performance by only redrawing screen when needed
  70. set lazyredraw
  71. " Copy and paste
  72. " Selection
  73. " v and arrows select characters
  74. " V select entire lines
  75. " d on something selected cuts it -- also used for delete
  76. " y = yank = copy
  77. " P paste before cursor
  78. " p paste after cursor
  79. " Basic Vim navigation
  80. " :sp file -- this will open a new file horizontally
  81. " :vsp file -- will open a file splitting vertically
  82. " ctrl-w w -- this will toggle to another open vim window