-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
executable file
·87 lines (71 loc) · 3.11 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
" -----------------------------------------------------------------------------
" Pathogen for package management
" -----------------------------------------------------------------------------
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
syntax on
filetype plugin indent on
" -----------------------------------------------------------------------------
" Some general options
" -----------------------------------------------------------------------------
set nocompatible " No Vi compatibility
set shortmess+=I " No Welcome screen
set backspace=indent,eol,start " Fix for buggy backspace problem
set tabstop=2 " 2 space tab stop
set shiftwidth=2 " 2 space shift width
set softtabstop=2 " 2 space soft tab stop
set autoindent " use auto indent
set smartindent " use smart indent
set expandtab " expand tabs to spaces
set ruler " Show line and column number
set textwidth=80 " Maximum 80 chars per line
set whichwrap+=<,>,h,l,[,] " Arrows wrap around
set hidden " Buffers can exist in the background
set fillchars="" " Remove ugly split character
set mouse+=a " Enable mouse for scrolling
set number " Show line numbers
set confirm " Confirm write on exit
set cursorline " Show current line
set clipboard=unnamedplus " Synchronize with clipboard
set wildmenu " Command completions
set wildmode=longest:full,full " Command completions
set backup " Use backup files
set writebackup " Write a backup file
set noswapfile " Don't write a swap file
" -----------------------------------------------------------------------------
" Colour scheme
" -----------------------------------------------------------------------------
syntax enable
set background=dark
colorscheme solarized
" Set 16 colours if gui isn't running
if !has("gui_running")
set t_Co=16
endif
" -----------------------------------------------------------------------------
" Some GUI options
" -----------------------------------------------------------------------------
if has("gui_running")
set guioptions-=T " No tool bar
set guioptions-=m " No menu bar
set guifont=Ubuntu\ Mono\ 13
set lines=25 columns=80 " The size of the window
endif
" -----------------------------------------------------------------------------
" Some tmux options
" -----------------------------------------------------------------------------
if &term =~ '^screen'
set ttymouse=xterm2 " Enable better mouse movement in vim
endif
" -----------------------------------------------------------------------------
" Some latex stuff
" -----------------------------------------------------------------------------
let g:tex_flavor="latex"
function! g:ToggleNuMode()
if(&rnu == 1)
set nornu
else
set rnu
endif
endfunction
nnoremap <silent> <C-L> :call g:ToggleNuMode()<cr>