annotate runtime/ftplugin/context.vim @ 29634:08e35dfcb499

Added tag v9.0.0157 for changeset e80174903fdf42b3686ac02b5469174f188641c5
author Bram Moolenaar <Bram@vim.org>
date Sat, 06 Aug 2022 22:15:07 +0200
parents 3b34837f4538
children 2acb87ee55fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
2 " Language: ConTeXt typesetting engine
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
3 " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
4 " Former Maintainers: Nikolai Weibull <now@bitwi.se>
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
5 " Latest Revision: 2021 Oct 15
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
6
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
7 if exists("b:did_ftplugin")
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
8 finish
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
9 endif
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
10 let b:did_ftplugin = 1
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
11
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
12 let s:cpo_save = &cpo
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
13 set cpo&vim
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
14
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
15 if !exists('current_compiler')
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
16 compiler context
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
17 endif
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
18
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
19 let b:undo_ftplugin = "setl com< cms< def< inc< sua< fo< ofu<"
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
20
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
21 setlocal comments=b:%D,b:%C,b:%M,:% commentstring=%\ %s formatoptions+=tjcroql2
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
22 if get(b:, 'context_metapost', get(g:, 'context_metapost', 1))
10319
169a62d5bcb9 commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents: 10301
diff changeset
23 setlocal omnifunc=contextcomplete#Complete
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
24 let g:omni_syntax_group_include_context = 'mf\w\+,mp\w\+'
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
25 let g:omni_syntax_group_exclude_context = 'mfTodoComment'
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
26 endif
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
27
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
28 let &l:define='\\\%([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\='
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
29 \ . 'def\|\\font\|\\\%(future\)\=let'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
30 \ . '\|\\new\%(count\|dimen\|skip\|muskip\|box\|toks\|read\|write'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
31 \ . '\|fam\|insert\|if\)'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
32
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
33 let &l:include = '^\s*\\\%(input\|component\|product\|project\|environment\)'
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
34
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
35 setlocal suffixesadd=.tex
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
36
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
37 if exists("loaded_matchit") && !exists("b:match_words")
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
38 let b:match_ignorecase = 0
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
39 let b:match_skip = 'r:\\\@<!\%(\\\\\)*%'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
40 let b:match_words = '(:),\[:],{:},\\(:\\),\\\[:\\],' .
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
41 \ '\\start\(\a\+\):\\stop\1'
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
42 let b:undo_ftplugin .= " | unlet! b:match_ignorecase b:match_words b:match_skip"
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 839
diff changeset
43 endif
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
44
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
45 let s:context_regex = {
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
46 \ 'beginsection' : '\\\%(start\)\=\%(\%(sub\)*section\|\%(sub\)*subject\|chapter\|part\|component\|product\|title\)\>',
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
47 \ 'endsection' : '\\\%(stop\)\=\%(\%(sub\)*section\|\%(sub\)*subject\|chapter\|part\|component\|product\|title\)\>',
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
48 \ 'beginblock' : '\\\%(start\|setup\|define\)',
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
49 \ 'endblock' : '\\\%(stop\|setup\|define\)'
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
50 \ }
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
51
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
52 function! s:move_around(count, what, flags, visual)
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
53 if a:visual
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
54 exe "normal! gv"
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
55 endif
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
56 call search(s:context_regex[a:what], a:flags.'s') " 's' sets previous context mark
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
57 call map(range(2, a:count), 'search(s:context_regex[a:what], a:flags)')
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
58 endfunction
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
59
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
60 if !exists("no_plugin_maps") && !exists("no_context_maps")
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
61 " Move around macros.
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
62 nnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:false) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
63 vnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:true) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
64 nnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:false) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
65 vnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:true) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
66 nnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:false) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
67 vnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:true) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
68 nnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:false) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
69 vnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:true) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
70 nnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:false) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
71 vnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:true) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
72 nnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:false) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
73 vnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:true) <CR>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
74
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
75 let b:undo_ftplugin .= " | sil! exe 'nunmap <buffer> [[' | sil! exe 'vunmap <buffer> [['" .
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
76 \ " | sil! exe 'nunmap <buffer> ]]' | sil! exe 'vunmap <buffer> ]]'" .
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
77 \ " | sil! exe 'nunmap <buffer> []' | sil! exe 'vunmap <buffer> []'" .
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
78 \ " | sil! exe 'nunmap <buffer> ][' | sil! exe 'vunmap <buffer> ]['" .
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
79 \ " | sil! exe 'nunmap <buffer> [{' | sil! exe 'vunmap <buffer> [{'" .
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
80 \ " | sil! exe 'nunmap <buffer> ]}' | sil! exe 'vunmap <buffer> ]}'"
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
81 end
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
82
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
83 " Other useful mappings
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
84 if get(g:, 'context_mappings', 1)
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
85 let s:tp_regex = '?^$\|^\s*\\\(item\|start\|stop\|blank\|\%(sub\)*section\|chapter\|\%(sub\)*subject\|title\|part\)'
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
86
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
87 fun! s:tp()
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
88 call cursor(search(s:tp_regex, 'bcW') + 1, 1)
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
89 normal! V
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
90 call cursor(search(s:tp_regex, 'W') - 1, 1)
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
91 endf
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
92
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
93 if !exists("no_plugin_maps") && !exists("no_context_maps")
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
94 " Reflow paragraphs with commands like gqtp ("gq TeX paragraph")
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
95 onoremap <silent><buffer> tp :<c-u>call <sid>tp()<cr>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
96 " Select TeX paragraph
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
97 vnoremap <silent><buffer> tp <esc>:<c-u>call <sid>tp()<cr>
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
98
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
99 " $...$ text object
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
100 onoremap <silent><buffer> i$ :<c-u>normal! T$vt$<cr>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
101 onoremap <silent><buffer> a$ :<c-u>normal! F$vf$<cr>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
102 vnoremap <buffer> i$ T$ot$
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
103 vnoremap <buffer> a$ F$of$
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
104
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
105 let b:undo_ftplugin .= " | sil! exe 'ounmap <buffer> tp' | sil! exe 'vunmap <buffer> tp'" .
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
106 \ " | sil! exe 'ounmap <buffer> i$' | sil! exe 'vunmap <buffer> i$'" .
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
107 \ " | sil! exe 'ounmap <buffer> a$' | sil! exe 'vunmap <buffer> a$'"
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10319
diff changeset
108 endif
10301
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
109 endif
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
110
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
111 " Commands for asynchronous typesetting
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
112 command! -buffer -nargs=? -complete=file ConTeXt call context#typeset(<q-args>)
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
113 command! -nargs=0 ConTeXtJobStatus call context#job_status()
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
114 command! -nargs=0 ConTeXtStopJobs call context#stop_jobs()
07d2b5a3b7cc commit https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
115
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
116 let &cpo = s:cpo_save
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
117 unlet s:cpo_save