Prevent autocomplete for some file extensions
-
I’m using np++ to edit grading files for a class I TA for. I would like to avoid having autocomplete active for these files. Is there a way to accomplish that currently?
-
Hello Ben-Frey,
natively, no. What could be done is using a python script.
But this is a bit of a hack as this script would set all chars
you define as a stop char. But this means also you need to install
the python script plugin. Instructions how to setup are here.The script would look like this
import os ext = '.txt' # extension which shouldn't have autocompletion charset = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_' # chars which should prevent autocompletion def callback_BUFFERACTIVATED(args): filename, extension = os.path.splitext(notepad.getBufferFilename(args["bufferID"])) if extension == ext: editor.autoCStops(charset) notepad.clearCallbacks([NOTIFICATION.BUFFERACTIVATED]) notepad.callback(callback_BUFFERACTIVATED, [NOTIFICATION.BUFFERACTIVATED])Cheers
Claudia
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login