Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shortcut (<leader>seb) to execute the complete buffer #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zerabba
Copy link

@zerabba zerabba commented Mar 7, 2016

No description provided.

@dfishburn
Copy link

There is already sea (select - execute - all).

When is the latin1 encoding required for sqlplus?
Is that only on Windows boxes?
Is it for certain versions of sqlplus?

Thanks,
David

@zerabba
Copy link
Author

zerabba commented Mar 9, 2016

Sorry, I didn't see the option in the menu, that's why I add something like seb. Maybe you could add the sea in the menu list?

I'm working on an Oracle database and it's in latin1 encoded. And my Vim encoding option is in utf-8 (for vim-airline). So when I send my script to sqlplus, it sends in utf-8... I'm a newbie in vim, so I found that way to solve my encoding problem. But there is maybe a solution by taking the fileencoding option instead of convert the temp file?

best regards,

Raphaël

@zerabba
Copy link
Author

zerabba commented Mar 9, 2016

Sorry, I didn't want to pull request the encoding problem... it was normally just for my fork :)

@dfishburn
Copy link

Good suggestion about adding a menu for it, that will be in the next version of dbext.

I was looking at your code for the encoding bit. That would be difficult for me to implement in a generic way. There aren't really any functions to do that at this point in Vim. For example writefile() will write out the exact same encodings (or possibly) just the default encodings.

Maybe you could try something for me.

Since you are currently editing a UTF file, what happens when you use writefile().

Maybe something like this to write out the first 10 lines of the current file I am editing:
call writefile(getbufline('%', 1, 10), 'c:\temp\testfile.txt')

If you try that with different encoded files and let me know what the encoding is of the outputted file, maybe we can so somewhere with it.

David

@dfishburn
Copy link

I noticed \sea (All), \sel (Line) and \sep (Previous) were missing.
These will be part of the dbext 24.00 release.
David

@rike09
Copy link

rike09 commented Jul 24, 2019

Hi, I know this thread is quite old now, but I was facing the same problem (in my case with ISO8859-15) and the fix was the only thing that worked for me.

I wonder I could apply a similar fix to the preview window with the output, as it shows in UTF-8 and with garbled text. Any ideas?

Thanks,
Henrique

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants