Advertisement
Io-EE

.vimrc

Aug 8th, 2011
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.71 KB | None | 0 0
  1. " All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
  2. " /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
  3. " you can find below.  If you wish to change any of those settings, you should
  4. " do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
  5. " everytime an upgrade of the vim packages is performed.  It is recommended to
  6. " make changes after sourcing debian.vim since it alters the value of the
  7. " 'compatible' option.
  8.  
  9. " This line should not be removed as it ensures that various options are
  10. " properly set to work with the Vim-related packages available in Debian.
  11. runtime! debian.vim
  12.  
  13. " Uncomment the next line to make Vim more Vi-compatible
  14. " NOTE: debian.vim sets 'nocompatible'.  Setting 'compatible' changes numerous
  15. " options, so any other options should be set AFTER setting 'compatible'.
  16. "set compatible
  17.  
  18. " Vim5 and later versions support syntax highlighting. Uncommenting the
  19. " following enables syntax highlighting by default.
  20. "if has("syntax")
  21.   syntax on
  22. "endif
  23.  
  24. " If using a dark background within the editing area and syntax highlighting
  25. " turn on this option as well
  26. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""OFTEN NECESSARY
  27. set background=dark
  28.  
  29. " Uncomment the following to have Vim jump to the last position when
  30. " reopening a file
  31. "if has("autocmd")
  32. "  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
  33. "endif
  34.  
  35. " Uncomment the following to have Vim load indentation rules and plugins
  36. " according to the detected filetype.
  37. if has("autocmd")
  38.  filetype plugin indent on
  39. endif
  40.  
  41. " The following are commented out as they cause vim to behave a lot
  42. " differently from regular Vi. They are highly recommended though.
  43. set showcmd     " Show (partial) command in status line.
  44. "set showmatch      " Show matching brackets.
  45. set ignorecase      " Do case insensitive matching
  46. "set smartcase      " Do smart case matching
  47. "set incsearch      " Incremental search
  48. "set autowrite      " Automatically save before commands like :next and :make
  49. "set hidden             " Hide buffers when they are abandoned
  50. "set mouse=a        " Enable mouse usage (all modes)
  51.  
  52. " Source a global configuration file if available
  53.  
  54. "========ADDED BY Io-EE=========
  55. "===============================
  56.  
  57. "permet d'afficher le numéro de ligne:
  58. set number
  59. "indentation automatique:
  60. set autoindent
  61. "tabulations
  62. set tabstop=3 "largeur d'une tabulation (quand on appuie sur tab)
  63. set shiftwidth=3 "idem, pour les tab logiciels (indentation auto)
  64. set smartindent "indente auto après une { par exemple.
  65.  
  66. "=============================auto-complétion:
  67.  
  68. " prérequis tags
  69. set nocp
  70. filetype plugin on
  71.  
  72. " configure tags - add additional tags here or comment out not-used ones
  73. set tags+=~/.vim/tags/stl
  74. set tags+=~/.vim/tags/gl
  75. set tags+=~/.vim/tags/sdl
  76. set tags+=~/.vim/tags/qt4
  77.  
  78. " build tags of your own project with CTRL+F12
  79. "map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
  80. noremap <F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<cr>
  81. inoremap <F12> <Esc>:!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<cr>
  82.  
  83. " OmniCppComplete
  84. let OmniCpp_NamespaceSearch = 1
  85. let OmniCpp_GlobalScopeSearch = 1
  86. let OmniCpp_ShowAccess = 1
  87. let OmniCpp_MayCompleteDot = 1
  88. let OmniCpp_MayCompleteArrow = 1
  89. let OmniCpp_MayCompleteScope = 1
  90. let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
  91.  
  92. " automatically open and close the popup menu / preview window
  93. au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
  94. set completeopt=menuone,menu,longest,preview
  95.  
  96. "===============================
  97.  
  98. if filereadable("/etc/vim/vimrc.local")
  99.  source /etc/vim/vimrc.local
  100. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement