Subversion Repositories mysets

Rev

Rev 397 | Rev 1098 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
290 zsolt 1
" LaTeX filetype plugin
2
" Language:     LaTeX (ft=tex)
3
" Maintainer:   Benji Fisher, Ph.D. <benji@member.AMS.org>
4
" Version:      1.4
5
" Last Change:  Wed 19 Apr 2006
6
"  URL:         http://www.vim.org/script.php?script_id=411
7
" Only do this when not done yet for this buffer.
8
 
328 zsolt 9
let g:Tex_Leader = "'"
10
let g:Tex_Leader2 = ':'
11
 
290 zsolt 12
"colorscheme molokai
13
if exists("b:did_ftplugin")
14
  finish
15
endif
16
 
17
" Start with plain TeX.  This will also define b:did_ftplugin .
18
" source $VIMRUNTIME/ftplugin/plaintex.vim
19
 
20
" Avoid problems if running in 'compatible' mode.
21
let s:save_cpo = &cpo
22
set cpo&vim
23
 
24
" Allow "[d" to be used to find a macro definition:
25
" Recognize plain TeX \def as well as LaTeX \newcommand and \renewcommand .
26
" I may as well add the AMS-LaTeX DeclareMathOperator as well.
27
let &l:define .= '\|\\\(re\)\=new\(boolean\|command\|counter\|environment\|font'
28
        \ . '\|if\|length\|savebox\|theorem\(style\)\=\)\s*\*\=\s*{\='
29
        \ . '\|DeclareMathOperator\s*{\=\s*'
30
 
31
" Tell Vim how to recognize LaTeX \include{foo} and plain \input bar :
32
let &l:include .= '\|\\include{'
33
" On some file systems, "{" and "}" are inluded in 'isfname'.  In case the
34
" TeX file has \include{fname} (LaTeX only), strip everything except "fname".
35
let &l:includeexpr = "substitute(v:fname, '^.\\{-}{\\|}.*', '', 'g')"
36
 
37
" The following lines enable the macros/matchit.vim plugin for
38
" extended matching with the % key.
39
" ftplugin/plaintex.vim already defines b:match_skip and b:match_ignorecase
40
" and matches \(, \), \[, \], \{, and \} .
41
"if exists("loaded_matchit")
42
"  let b:match_words .= ',\\begin\s*\({\a\+\*\=}\):\\end\s*\1'
43
"endif " exists("loaded_matchit")
44
 
45
let &cpo = s:save_cpo
46
 
47
se textwidth=75
48
 
309 zsolt 49
map <buffer> @a :TTemplate alap<CR><C-J>
305 zsolt 50
map <buffer> @d :TTemplate dolgozat<CR><C-J>
51
map <buffer> @f :TTemplate feladatsor<CR><C-J>
52
map <buffer> @o :TTemplate osszefoglalo<CR><C-J>
290 zsolt 53
 
54
" questions - exsheets package
326 zsolt 55
let g:Tex_Env_pontozas="\\begin{pontozas}\<CR>\\pontoz{<++>}{<++>}{<++>}\<CR><++>\<CR>\\end{pontozas}"
323 zsolt 56
let g:Tex_Env_questionpont="\\begin{question}{<++>}\<CR><++>\<CR>\\end{question}\<CR><++>"
57
let g:Tex_Env_question="\\begin{question}\<CR><++>\<CR>\\end{question}\<CR><++>"
58
let g:Tex_Env_tasks="\\begin{tasks}\<CR>\\task <++>\<CR>\\end{tasks}\<CR><++>"
59
let g:Tex_Env_taskspont="\\begin{tasks}\<CR>\\task\\subpoints{<++>} <++>\<CR>\\end{tasks}\<CR><++>"
60
let g:Tex_Env_mpc="\\begin{tasks}[style=multiplechoice](<++>)\<CR>\\task <++>\<CR>\\end{tasks}\<CR><++>"
327 zsolt 61
let g:Tex_Com_frac="\\frac{<++>}{<++>}<++>"
324 zsolt 62
let g:Tex_Com_hely="\\hely{<++>cm}<++>"
63
let g:Tex_Com_pontoz="\\pontoz{<+leírás+>}{<+pontszám+>}{<+megjegyzés+>}\<CR><++>"
64
let g:Tex_Com_subpoints="\\subpoints{<++>}\<CR><++>"
65
let g:Tex_Com_task="\\task "
66
let g:Tex_Com_Task="\\task\\subpoints{<++>} <++> "
67
let g:Tex_Com_vary="\\vary{<++>}{<++>}"
68
let g:Tex_Com_Vary="\\vary{\<CR><++>\<CR>}{\<CR><++>\<CR>}"
69
let g:Tex_Com_vegeredmeny="\\vegeredmeny{<++>}<++>"
325 zsolt 70
 
71
let g:Tex_ItemStyle_pontozas=g:Tex_Com_pontoz
72
 
323 zsolt 73
call IMAP('??',g:Tex_Env_questionpont,'tex')
74
call IMAP('?q',g:Tex_Env_question,'tex')
75
call IMAP('?t',g:Tex_Env_tasks,'tex')
76
call IMAP('?T',g:Tex_Env_taskspont,'tex')
77
call IMAP('?c',g:Tex_Env_mpc,'tex')
324 zsolt 78
call IMAP('?p',g:Tex_Com_task,'tex')
79
call IMAP('?P',g:Tex_Com_Task,'tex')
323 zsolt 80
call IMAP('?s',g:Tex_Env_pontozas,'tex')
324 zsolt 81
call IMAP('?e',g:Tex_Com_hely,'tex')
82
call IMAP('?r',g:Tex_Com_pontoz,'tex')
83
call IMAP('?j',g:Tex_Com_subpoints,'tex')
84
call IMAP('?v',g:Tex_Com_vary,"tex")
85
call IMAP('?V',g:Tex_Com_Vary,"tex")
86
call IMAP('.v',Tex_Com_vegeredmeny,"tex")
290 zsolt 87
call IMAP('?o',"\\ora{<++>}{<++>}\<CR><++>","tex")
397 zsolt 88
map ce :call Tex_ChangeEnvironments()<CR>
290 zsolt 89
 
328 zsolt 90
call IMAP(g:Tex_Leader.'3', '\sqrt[<++>]{<++>}<++>', "tex")
290 zsolt 91
call IMAP('.->',"\\rightarrow ",'tex')
92
call IMAP('.=>',"\\Rightarrow ",'tex')
93
call IMAP('.|>',"\\mapsto ",'tex')
94
 
95
call IMAP('.R',"\\mathbb{R}",'tex')
96
call IMAP('.Z',"\\mathbb{Z}",'tex')
97
call IMAP('.N',"\\mathbb{N}",'tex')
98
 
99
call IMAP('.D',"\\displaystyle ",'tex')
100
call IMAP('.T',"\\text{<++>}<++> ",'tex')
101
 
327 zsolt 102
call IMAP('//',g:Tex_Com_frac,'tex')
290 zsolt 103
 
104
" siunitx package
105
call IMAP('.si','\SI{<++>}{<++>}<++>','tex')
322 zsolt 106
call IMAP('.n','\num{<++>}<++>','tex')
290 zsolt 107
call IMAP('.c','\celsius','tex')
108
call IMAP('.p','\per ','tex')
109
call IMAP('.it',"\\begin{itemize}\<CR>\\item <++>\<CR>\\end{itemize}\<CR><++>",'tex')
304 zsolt 110
call IMAP('.%','\SI{<++>}{\percent}<++>','tex')
290 zsolt 111
 
112
call IMAP(':*','\cdot ','tex')
113
 
114
" to insert 'é'
115
imap <buffer> <leader>it <Plug>Tex_InsertItemOnThisLine
116
 
117
let g:Tex_DefaultTargetFormat = 'pdf'
118
let g:Tex_MultipleCompileFormats = 'dvi,pdf'
119
let g:Tex_ViewRule_ps = 'ghostview'
120
"let g:Tex_ViewRule_pdf = '/home/users/zsolt/bin/latex-viewer -watch -widgetless -scale 0.6'
121
let g:Tex_ViewRule_pdf = '/home/zsolt/bin/latex-viewer '
122
let g:Tex_ViewRule_dvi = 'xdvi'
123
let g:Tex_CompileRule_pdf = "/home/zsolt/bin/latex-compile -interaction=nonstopmode -shell-escape $*"
124
let s:target = 'pdf'
125
 
126
let g:Tex_IgnoredWarnings =
127
        \'Underfull'."\n".
128
        \'Overfull'."\n".
129
        \'specifier changed to'."\n".
130
        \'You have requested'."\n".
131
        \'Missing number, treated as zero.'."\n".
132
        \'There were undefined references'."\n".
133
        \'Citation %.%# undefined'."\n".
134
        \'Overwriting file'."\n".
135
    \'Marginpar on page'."\n" .
136
    \'LaTeX Font Warning: Font shape'."\n" .
301 zsolt 137
    \'LaTeX Font Warning: Size substitutions'."\n" .
303 zsolt 138
    \'Package auxhook Warning: Cannot patch' . "\n" .
139
    \'Package hyperref Warning: Option' . "\n" .
307 zsolt 140
    \'Package pgfplots Warning: running' . "\n" .
141
    \'Package csquotes Warning: No style for language' . "\n" .
142
    \'Package magyar.ldf Warning: No effect on' . "\n"
290 zsolt 143
 
144
let g:Tex_IgnoreLevel=20
145
 
146
let g:Imap_PlaceHolderStart = '|<'
147
let g:Imap_PlaceHolderEnd = '>|'
148
 
149
set spell
150
set spellsuggest=best,5
151
 
152
" vim:sts=2:sw=2: