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

AddColumn inserts column before current column, instead of after #32

Closed
lahvak opened this Issue May 2, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@lahvak

lahvak commented May 2, 2014

According to the documentation, AddColumn is supposed to add a column after the current column. It seems to insert column before the current column instead, except for the last column, where it adds column after the last column correctly. If I try to specify column using a numeric argument, using

:AddColumn 13

I get the following error:

Error detected while processing function <SNR>129_AddColumn:
line   27:
E121: Undefined variable: pos
line   30:
E121: Undefined variable: pos
E15: Invalid expression: pos == 0
line   38:
E121: Undefined variable: pat
E15: Invalid expression: pat != '$' || (pat == '$' &&  getline(a:stop)[-1:] == b:delimiter)
line   62:
E121: Undefined variable: pat
E116: Invalid arguments for function printf("sil %d,%ds/%s/%s/e", a:start, a:stop, pat, subst)
E15: Invalid expression: printf("sil %d,%ds/%s/%s/e", a:start, a:stop, pat, subst)

@chrisbra chrisbra closed this in edf2c39 May 2, 2014

@chrisbra

This comment has been minimized.

Show comment
Hide comment
@chrisbra

chrisbra May 2, 2014

Owner

Hi lahvak!

On Do, 01 Mai 2014, lahvak wrote:

According to the documentation, AddColumn is supposed to add a column after the current column. It seems to insert column before the current column instead, except for the last column, where it adds column after the last column correctly. If I try to specify column using a numeric argument, using

:AddColumn 13

I get the following error:

Error detected while processing function <SNR>129_AddColumn:
line   27:
E121: Undefined variable: pos
line   30:
E121: Undefined variable: pos
E15: Invalid expression: pos == 0
line   38:
E121: Undefined variable: pat
E15: Invalid expression: pat != '$' || (pat == '$' &&  getline(a:stop)[-1:] == b:delimiter)
line   62:
E121: Undefined variable: pat
E116: Invalid arguments for function printf("sil %d,%ds/%s/%s/e", a:start, a:stop, pat, subst)
E15: Invalid expression: printf("sil %d,%ds/%s/%s/e", a:start, a:stop, pat, subst)

Thanks for noticing me. Should be fixed now.

Best,

Christian

Aus Lügen, die wir glauben, werden Wahrheiten, mit denen wir leben.
-- Oliver Hassencamp

Owner

chrisbra commented May 2, 2014

Hi lahvak!

On Do, 01 Mai 2014, lahvak wrote:

According to the documentation, AddColumn is supposed to add a column after the current column. It seems to insert column before the current column instead, except for the last column, where it adds column after the last column correctly. If I try to specify column using a numeric argument, using

:AddColumn 13

I get the following error:

Error detected while processing function <SNR>129_AddColumn:
line   27:
E121: Undefined variable: pos
line   30:
E121: Undefined variable: pos
E15: Invalid expression: pos == 0
line   38:
E121: Undefined variable: pat
E15: Invalid expression: pat != '$' || (pat == '$' &&  getline(a:stop)[-1:] == b:delimiter)
line   62:
E121: Undefined variable: pat
E116: Invalid arguments for function printf("sil %d,%ds/%s/%s/e", a:start, a:stop, pat, subst)
E15: Invalid expression: printf("sil %d,%ds/%s/%s/e", a:start, a:stop, pat, subst)

Thanks for noticing me. Should be fixed now.

Best,

Christian

Aus Lügen, die wir glauben, werden Wahrheiten, mit denen wir leben.
-- Oliver Hassencamp

vim-scripts added a commit to vim-scripts/csv.vim that referenced this issue Jan 16, 2015

Version 31
- fix that H on the very first cell, results in an endless loop (chrisbra/csv.vim#31, reported by lahvak, thanks!)- fix that count for |AddColumn| did not work (according to the documentation) (chrisbra/csv.vim#32, reported by lahvak, thanks!)- invalid reference to a WarningMsg() function- WhatColumn! error, if the first line did not contain as many fields as the line to check.- Rename |:Table| command to |:CSVTable| ( chrisbra/csv.vim#33, reported by Peter Jaros, thanks!)- Mention to escape special characters when manually specifying the delimiter. chrisbra/csv.vim#35), also detect '^' as delimiter.- Csv fixed with columns better use '\%v' to match columns, otherwise, one could get problems with multibyte chars- Sorting should work better with csv fixed with patterns (could generate an inavlide pattern before)- Refactor GetSID() (provided by Ingo Karkat chrisbra/csv.vim#37, thanks!)- New public function |CSVSum()|- Restrict |csv-arrange-autocmd| to specific file sizes (suggested by Spencer Boucher in chrisbra/csv.vim#39, thanks!)- Make |:CSVSearchInColumn| wrap pattern in '%\(..\)' pairs, so it works correctly with '\|' atoms- Small improvements on |:CSVTable| and |:NewDelimiter| command- <Up> and <Down> should skip folds (like in normal Vi mode, suggested by  Kamaraju Kusuma, thanks!)(automatically uploaded)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment