Why keywords in tcl and c pop up when to call tag completion for python?
Asked Answered
C

1

9

Evironment:debian8+vim8.
filetype is on status both in .vimrc and vim/runtime/ftplugin/python.vim .

cat   .vimrc
execute pathogen#infect()
execute pathogen#helptags()
syntax on
filetype plugin indent on

cat vim/runtime/ftplugin/python.vim
setlocal omnifunc=pythoncomplete#Complete
filetype plugin indent on
"other lines omitted.

Some questions puzzled me.
1.on omni completion
1.1 class name in module
The class or method in a module can be completed.
enter image description here

1.2 build-in function name

import sys
for key,value in enum

To press ctrlxctrlo,no enumerate pop up, Why build-in function name can't be completed with ctrlxctrlo ?

2.tag completion
No tag file prepared for python file,no ctags -R * executed for any python file.
Where did vim get these keywords from when to press ctrlxctrl] in editing test.py?

To input fil in test.py and call omni completion with ctrlxctrlo,no omni completion menu pop up.
To input fil in test.py and call tag completion with ctrlxctrl],tag completion menu pop up.

enter image description here For the matched keyword fileAttrStringsProc,

grep  -lr   'fileAttrStringsProc'  /usr/include/
/usr/include/tcl8.6/tcl-private/generic/tcl.h
/usr/include/tcl8.6/tcl.h
grep  -n  'fileAttrStringsProc'  /usr/include/tcl8.6/tcl.h
1805:    Tcl_FSFileAttrStringsProc *fileAttrStringsProc;

For the marched keyowrd file_handle,

grep  -lr   'file_handle'  /usr/include/
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h

grep  -n  'file_handle'   /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h
311:struct file_handle
403:                  struct file_handle *__handle, int *__mnt_id,
410:extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,

The keyowrd file_handle is in a c file.
2.1 tcl keywords pop up
Why keywords in tcl pop up when to call tag completion for python?

2.2 c keywords pop up
Why keywords in c file pop up when to call tag completion for python?

3.Which file control the behavior of tag completion?
The file here ,/vim/runtime/autoload/pythoncomplete.vim ,control the behavior of omni completion.
Which file control the behavior of tag completion?
Why no tag file for any python file,to press ctrlxctrl] output tag completion menu?

Criminology answered 18/7, 2017 at 3:7 Comment(0)
Q
9

Those are not actually Tcl keywords, but rather functions, arguments or methods in Python that bind to Tcl commands. (Tcl wouldn't have the underscores in there.)

The binding from Python to Tcl is part of Tkinter.

Quinze answered 18/7, 2017 at 6:10 Comment(4)
How to explain the keyword file_handle then ,it is in c file?Criminology
The file_handle stuff is Python-side somewhere (no idea where from). It doesn't correspond to anything meaningful in Tcl (where the equivalent concept is called a “channel”).Quinze
What is the reaction process when to press <kbd>ctrl</kbd><kbd>x</kbd><kbd>ctrl</kbd><kbd>]</kbd> for calling tag completion?Criminology
and other questions??Criminology

© 2022 - 2024 — McMap. All rights reserved.