Thursday, June 27, 2024

Re: Configuration file does not support #

On 2024-06-27, ζŽεδΉ‹ <ogouo168@gmail.com> wrote:
> Why does an error occur when changing the comment of the vim9.1
> configuration file to #? 9.1 does not support #

Not sure I understand your question, but before `vim9script` you should
use the legacy comment symbol " (double quote). For example:

" vim: set sw=2 ts=2 sts=0 et fdm=marker :nospell:
" Here, legacy comments must be used
" In general, before `vim9script`, legacy syntax is assumed

if !has('vim9script')
" Still legacy Vim script syntax
echomsg 'Vim 9 script is not available')
finish
endif

vim9script

# Now, Vim 9 script syntax is assumed
# The comment delimiter must be #

Hope this helps,
Life.


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/v5kj3s%24vbo%241%40ciao.gmane.io.

Configuration file does not support #

Why does an error occur when changing the comment of the vim9.1 configuration file to #? 9.1 does not support #

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5706f749-f601-467c-86dd-b800f6f54efan%40googlegroups.com.

Sunday, June 23, 2024

Re: ":b {bufname}" tab-completion uses whole filepath

On 2024-06-14, Enan Ajmain <3nan.ajmain@gmail.com> wrote:
> I use ':b' quite often. And I use a substring of the bufname to jump to
> that buffer. Works quite well.
>
> But a problem is that the substring I provide isn't only matched with
> the buffer names but also the filenames. See these examples:
>
> :ls
> 1 #h "example\predict.py" line 25
> 2 a "deeplog\deeplog.py" line 0
> 4 %a "example\train.py" line 37
> :b deep<tab>
>
> Then when I type ":b deep<tab>", the matches shown are:
>
> E:\projects\log-parsing\deeplog\example\predict.py
> deeplog\deeplog.py
> E:\projects\log-parsing\deeplog\example\train.py
>
> We can see that vim is matching the filepaths instead of only the buffer
> names. Can I change this behavior? Preferably with vimscripting, --

If you don't mind using a (lightweight) plugin, you can do it with my
Zeef¹ plugin. Zeef has a buffer switcher, which may or may not work for
you, but simplifying the creation of one tailored to your own specific
needs is the very purpose of the plugin. This is an example:

vim9script
import autoload 'zeef.vim'

def SwitchToBuffer(items: list<string>)
execute 'buffer' matchstr(items[0], '^\s*\zs\d\+')
enddef

zeef.Open(
execute('ls')->split("\n"),
SwitchToBuffer,
'Choose buffer',
{multi: false},
)

Hope this helps,
Life.

¹ https://github.com/lifepillar/vim-zeef



--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/v599m0%248b7%241%40ciao.gmane.io.

Re: partial syntax in vim

On 2024-06-17, Andreas Otto <aotto1968zwei@gmail.com> wrote:
> Hi is it possible to change the syntax for a limit part of a file?

Yes. See :help syn-include and :help mysyntaxfile-add.

> example: tcl file with bash syntax used with "pseudo code" vim: push … vim:

I do not recommend using comments with `vim:` because they are
interpreted specially by Vim. Just use (for instance):

if {checkNotIgnore("DIFF")} {
File_Exec_BASH {
# syntax=bash
[...]
# pop syntax
} <@stdin >@stdout 2>@stderr
}

Create ~/.vim/after/syntax/tcl.vim with this content:

unlet b:current_syntax
syn include @Bash syntax/bash.vim
syn region tclBash matchgroup=Comment start=/^\s*# syntax=bash/ end=/^\s*# pop syntax/ contains=@Bash
let b:current_syntax = "tcl"

Hope this helps,
Life.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/v598nh%2433u%241%40ciao.gmane.io.

Sunday, June 16, 2024

partial syntax in vim

Hi is it possible to change the syntax for a limit part of a file?
example: tcl file with bash syntax used with "pseudo code" vim: push … vim: pop

if {checkNotIgnore("DIFF")} {
  File_Exec_BASH {
    # vim: push syntax=bash
    set -ue

    [[ "$(yes_or_no.bash 'want to exit?')" == "y" ]] && exit

    declare -a files=($(find . -name .vimrc 2>/dev/null))

    git diff "${files[@]}"

    if [[ $(git status --porcelain "${files[@]}") ]] ; then
      if [[ "$(yes_or_no.bash 'commit changes?')" = "y" ]] ; then
        git commit -m lng_Shortcut.tcl "${files[@]}"
      fi
      :
    fi
    exit 0
    # vim: pop syntax
  } <@stdin >@stdout 2>@stderr
}

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/abc1d980-74a7-4192-a288-6ad802758888n%40googlegroups.com.

Saturday, June 15, 2024

Re: ":b {bufname}" tab-completion uses whole filepath

On Fr, 14 Jun 2024, Enan Ajmain wrote:

> On Fri, 14 Jun 2024 22:52:10 +0200
> Christian Brabandt <cblists@256bit.org> wrote:
> >
> > You could try the following mapping:
> >
> > :cnoremap <expr> B getcmdtype()==#':'&&getcmdpos()==1?'b */':'B'
> >
> > And then type :B which would expand to :b */ on the commandline and then
> > whatever you type would be anchored to the directory separator.
>
> I think the cnoremap only maps 'B' to expand to "b */" if it's at the
> start of the commandline. But what's "b */" supposed to do? I added
> this mapping and then typed "deep" (so the whole commandline became "b
> */deep" and then pressed tab. It didn't do anything. No completion.

Ah Windows, I didn't think about it. So unless you use shellslash,
you'll need to change the mapping to use a backslash instead:

:cnoremap <expr> B getcmdtype()==#':'&&getcmdpos()==1?'b *\':'B'

> Could you explain the logic behind "anchored to the directory
> separator"?

The idea is, that you want everything that you typed to be matched after
a directory separator. So instead of :b deeplog<tab> which presents you
with 3 different files, anchor the pattern to the directory separator:
\deeplog.py which Vim shall then only complete if it matches the
directory separator followed by whatever you enter.

> Note that I also tried "b *\" and "b *\\" since I'm in Windows.

Try if :b *\<pattern><tab> works for you.


Thanks,
Christian
--
Unfair animal names:

-- tsetse fly -- bullhead
-- booby -- duck-billed platypus
-- sapsucker -- Clarence
-- Gary Larson

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zm2eN1txfljI05dC%40256bit.org.

Friday, June 14, 2024

Re: ":b {bufname}" tab-completion uses whole filepath

junegunn/fzf.vim solves this nicely. It builds on junegunn/fzf to fuzzy search on buffer names. Look into its :Buffers alongside other handy helper methods.


On Fri, 14 Jun 2024, 20:52 Christian Brabandt, <cblists@256bit.org> wrote:

On Fr, 14 Jun 2024, Enan Ajmain wrote:

> I use ':b' quite often.  And I use a substring of the bufname to jump to
> that buffer.  Works quite well.
>
> But a problem is that the substring I provide isn't only matched with
> the buffer names but also the filenames.  See these examples:
>
>     :ls
>       1 #h   "example\predict.py"           line 25
>       2  a   "deeplog\deeplog.py"           line 0
>       4 %a   "example\train.py"             line 37
>     :b deep<tab>
>
> Then when I type ":b deep<tab>", the matches shown are:
>
>     E:\projects\log-parsing\deeplog\example\predict.py
>     deeplog\deeplog.py
>     E:\projects\log-parsing\deeplog\example\train.py
>
> We can see that vim is matching the filepaths instead of only the buffer
> names.  Can I change this behavior?  Preferably with vimscripting, but
> I'm willing to change source code too since I use this too often.
>
> To be clear: I want only this match to be shown:
>
>     deeplog\deeplog.py

You could try the following mapping:

:cnoremap <expr> B getcmdtype()==#':'&&getcmdpos()==1?'b */':'B'

And then type :B which would expand to :b */ on the commandline and then
whatever you type would be anchored to the directory separator.

Thanks,
Christian
--
TAILFINS!! ... click ...

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zmytev/J%2BUjT7XXH%40256bit.org.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAOmRJrdSq0_psQiU40%2BUTAjJCy-unbBJ__vStbK4CpMP%2B74JOQ%40mail.gmail.com.

Re: ":b {bufname}" tab-completion uses whole filepath

On Fri, 14 Jun 2024 22:52:10 +0200
Christian Brabandt <cblists@256bit.org> wrote:
>
> You could try the following mapping:
>
> :cnoremap <expr> B getcmdtype()==#':'&&getcmdpos()==1?'b */':'B'
>
> And then type :B which would expand to :b */ on the commandline and then
> whatever you type would be anchored to the directory separator.

I think the cnoremap only maps 'B' to expand to "b */" if it's at the
start of the commandline. But what's "b */" supposed to do? I added
this mapping and then typed "deep" (so the whole commandline became "b
*/deep" and then pressed tab. It didn't do anything. No completion.

Could you explain the logic behind "anchored to the directory
separator"?

Note that I also tried "b *\" and "b *\\" since I'm in Windows.


--
Enan

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20240614190301.00004a7e%40gmail.com.

Re: ":b {bufname}" tab-completion uses whole filepath

On Fr, 14 Jun 2024, Enan Ajmain wrote:

> I use ':b' quite often. And I use a substring of the bufname to jump to
> that buffer. Works quite well.
>
> But a problem is that the substring I provide isn't only matched with
> the buffer names but also the filenames. See these examples:
>
> :ls
> 1 #h "example\predict.py" line 25
> 2 a "deeplog\deeplog.py" line 0
> 4 %a "example\train.py" line 37
> :b deep<tab>
>
> Then when I type ":b deep<tab>", the matches shown are:
>
> E:\projects\log-parsing\deeplog\example\predict.py
> deeplog\deeplog.py
> E:\projects\log-parsing\deeplog\example\train.py
>
> We can see that vim is matching the filepaths instead of only the buffer
> names. Can I change this behavior? Preferably with vimscripting, but
> I'm willing to change source code too since I use this too often.
>
> To be clear: I want only this match to be shown:
>
> deeplog\deeplog.py

You could try the following mapping:

:cnoremap <expr> B getcmdtype()==#':'&&getcmdpos()==1?'b */':'B'

And then type :B which would expand to :b */ on the commandline and then
whatever you type would be anchored to the directory separator.

Thanks,
Christian
--
TAILFINS!! ... click ...

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zmytev/J%2BUjT7XXH%40256bit.org.

Re: ":b {bufname}" tab-completion uses whole filepath

On 2024-06-14, Enan Ajmain wrote:
> I use ':b' quite often. And I use a substring of the bufname to jump to
> that buffer. Works quite well.
>
> But a problem is that the substring I provide isn't only matched with
> the buffer names but also the filenames. See these examples:
>
> :ls
> 1 #h "example\predict.py" line 25
> 2 a "deeplog\deeplog.py" line 0
> 4 %a "example\train.py" line 37
> :b deep<tab>
>
> Then when I type ":b deep<tab>", the matches shown are:
>
> E:\projects\log-parsing\deeplog\example\predict.py
> deeplog\deeplog.py
> E:\projects\log-parsing\deeplog\example\train.py
>
> We can see that vim is matching the filepaths instead of only the buffer
> names. Can I change this behavior? Preferably with vimscripting, but
> I'm willing to change source code too since I use this too often.
>
> To be clear: I want only this match to be shown:
>
> deeplog\deeplog.py

The full buffer name _is_ the full file name. Vim usually tries to
show the user a shorter name such as the relative file name. If, in
your example, you were to :cd to some other directory and execute
:ls again, you would see those buffer names as full path names.

I don't know of a built-in command or option that will give you what
you want. I think you would have to write a function that would
search the buffer list for a buffer whose basename or relative path
contained the substring you supplied and execute the :b command with
that name. Just the bufname() function with the appropriate
file-pattern would do a lot of the work.

You could then create a command to call that function. The command
name would have to begin with an upper-case letter, but you can also
use :cabbrev to create an abbreviation that expands 'b' at the
beginning of the command line to your command name. That would let
you continue to use the :b command that your fingers are used to.

For <tab> to work, you'd also need to create a completion function
that followed the same matching rules as your buffer function.

Maybe not simple, but doable in vimscript.

HTH,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20240614193251.GA15474%40phoenix.

":b {bufname}" tab-completion uses whole filepath

I use ':b' quite often. And I use a substring of the bufname to jump to
that buffer. Works quite well.

But a problem is that the substring I provide isn't only matched with
the buffer names but also the filenames. See these examples:

:ls
1 #h "example\predict.py" line 25
2 a "deeplog\deeplog.py" line 0
4 %a "example\train.py" line 37
:b deep<tab>

Then when I type ":b deep<tab>", the matches shown are:

E:\projects\log-parsing\deeplog\example\predict.py
deeplog\deeplog.py
E:\projects\log-parsing\deeplog\example\train.py

We can see that vim is matching the filepaths instead of only the buffer
names. Can I change this behavior? Preferably with vimscripting, but
I'm willing to change source code too since I use this too often.

To be clear: I want only this match to be shown:

deeplog\deeplog.py

Here's the version info:

:ver
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled May 21 2024 02:04:14)
MS-Windows 64-bit console version
Included patches: 1-426
Compiled by ACER@JUDAS
Huge version without GUI. Features included (+) or not (-):
+acl +ex_extra +multi_lang -tag_any_white
+arabic +extra_search -mzscheme -tcl
+autocmd -farsi -netbeans_intg +termguicolors
+autochdir +file_in_path +num64 -terminal
+autoservername +find_in_path +packages -termresponse
-balloon_eval +float +path_extra +textobjects
+balloon_eval_term +folding -perl +textprop
-browse -footer +persistent_undo -tgetent
++builtin_terms -gettext +popupwin +timers
+byte_offset -hangul_input -postscript +title
+channel +iconv/dyn +printer -toolbar
+cindent +insert_expand +profile +user_commands
+clientserver +ipv6 -python +vartabs
+clipboard +job -python3 +vertsplit
+cmdline_compl +jumplist +quickfix +vim9script
+cmdline_hist +keymap +reltime +viminfo
+cmdline_info +lambda +rightleft +virtualedit
+comments +langmap -ruby +visual
+conceal +libcall +scrollbind +visualextra
+cryptv +linebreak +signs +vreplace
-cscope +lispindent +smartindent +vtp
+cursorbind +listcmds -sodium +wildignore
+cursorshape +localmap -sound +wildmenu
+dialog_con -lua +spell +windows
+diff +menu +startuptime +writebackup
+digraphs +mksession +statusline -xattr
-dnd +modify_fname -sun_workshop -xfontset
-ebcdic +mouse +syntax -xim
+emacs_tags -mouseshape +tag_binary -xpm_w32
+eval +multi_byte_ime/dyn -tag_old_static -xterm_save
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
defaults file: "$VIMRUNTIME\defaults.vim"
Compilation: gcc -I. -Iproto -DWIN32 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_STDINT_H -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -march=x86-64 -Wall -O3 -fomit-frame-pointer -freg-struct-return
Linking: gcc -I. -Iproto -DWIN32 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_STDINT_H -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -march=x86-64 -Wall -O3 -fomit-frame-pointer -freg-struct-return -s -municode -o vim.exe -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion -lws2_32 -lole32 -luuid

--
Enan

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20240614124918.000005b6%40gmail.com.

Sunday, June 2, 2024

Re: Error building Vim

Enan,

Thank you for your detailed explanation. I had, indeed, failed to install both Python 2 and 3 and had only installed 3, though was building for both. Once I figured out that beginner error, I've been doing just fine with it. 

I got lucky with putting everything in my PATH, but the -I tip isn't something I'd thought to include myself. Very useful. 

Thank you, again.

Salman

On Mon, Jun 3, 2024, 00:29 Enan Ajmain <3nan.ajmain@gmail.com> wrote:
On Mon, 27 May 2024 23:09:16 -0400
Salman Halim <salmanhalim@gmail.com> wrote:
> Hello,
>
> I'm trying to set up a new Windows 11 laptop and have followed the steps in
> INSTALLpc.txt after getting the latest Vim repository from git. When I try
> to compile with Python support, I get the following error and compilation
> stops. I'm hoping someone can tell me what to do about this.
>
> if_python.c:66:10: fatal error: Python.h: No such file or directory
>    66 | #include <Python.h>
>       |          ^~~~~~~~~~
> compilation terminated.

Your compiler is failing to find the python header file.  MinGW doesn't
provide headers for Python.  You'll have to provide it yourself.

Install Python.  Install the version you want.  Get the location of the
executable by running Python and then running these Python statements:

  import sys
  print(sys.executable)

Assume the output is: C:\Python\python.exe

Then go into C:\Python and you should see a include/ folder (also a lib/
folder, which will come into use later).  There should be a Python.h
file, and all other Python-related header files, in this folder.  Add
this folder to the include folders when running the compiler (-I flag).

You'll also have to add the lib/ folder to the library folders when
linking (-l flag).  I can't remember the specific commands or flags.
Since you're building from source, I'm sure you know your C and GCC.

Good luck.

> My command-line (executed from inside vim/src):
>
> mingw32-make -f Make_ming.mak -j$NUMBER_OF_PROCESSORS GUI=yes FEATURES=HUGE
> PYTHON3=c:/Python312 PYTHON3_VER=312 PYTHON=c:/Python27 PYTHON_VER=27
> DYNAMIC_PYTHON=yes STATIC_STDCPLUS=yes DIRECTX=yes
>
> I've tried changing 'mingw32-make' to just 'make' and still get the same
> error. Running it with 'clean' instead of all the other parameters works as
> expected.
>
> I would appreciate any help here, please.
>
> Thank you and best regards,
>



--
Enan

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20240603002938.00002012%40gmail.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEeYicCNExurLQZ%3D2yyYUsS-0sh4sWUKL7GoWL0a%3DLbUyw%40mail.gmail.com.

Re: Error building Vim

On Mon, 27 May 2024 23:09:16 -0400
Salman Halim <salmanhalim@gmail.com> wrote:
> Hello,
>
> I'm trying to set up a new Windows 11 laptop and have followed the steps in
> INSTALLpc.txt after getting the latest Vim repository from git. When I try
> to compile with Python support, I get the following error and compilation
> stops. I'm hoping someone can tell me what to do about this.
>
> if_python.c:66:10: fatal error: Python.h: No such file or directory
> 66 | #include <Python.h>
> | ^~~~~~~~~~
> compilation terminated.

Your compiler is failing to find the python header file. MinGW doesn't
provide headers for Python. You'll have to provide it yourself.

Install Python. Install the version you want. Get the location of the
executable by running Python and then running these Python statements:

import sys
print(sys.executable)

Assume the output is: C:\Python\python.exe

Then go into C:\Python and you should see a include/ folder (also a lib/
folder, which will come into use later). There should be a Python.h
file, and all other Python-related header files, in this folder. Add
this folder to the include folders when running the compiler (-I flag).

You'll also have to add the lib/ folder to the library folders when
linking (-l flag). I can't remember the specific commands or flags.
Since you're building from source, I'm sure you know your C and GCC.

Good luck.

> My command-line (executed from inside vim/src):
>
> mingw32-make -f Make_ming.mak -j$NUMBER_OF_PROCESSORS GUI=yes FEATURES=HUGE
> PYTHON3=c:/Python312 PYTHON3_VER=312 PYTHON=c:/Python27 PYTHON_VER=27
> DYNAMIC_PYTHON=yes STATIC_STDCPLUS=yes DIRECTX=yes
>
> I've tried changing 'mingw32-make' to just 'make' and still get the same
> error. Running it with 'clean' instead of all the other parameters works as
> expected.
>
> I would appreciate any help here, please.
>
> Thank you and best regards,
>



--
Enan

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20240603002938.00002012%40gmail.com.

Saturday, June 1, 2024

Re: unexpected value from mode(1) command

On 05/26/2024 10:42 PM, M wrote:
> вс, 26 мая 2024 г., 19:25 Mike <mssr953@gmail.com>:
>
>> Hello.
>>
>> If, in normal mode, I type a colon followed by the command "echo
>> mode(1)", the value "n" is displayed in the command-line area indicating
>> normal mode. I would have expected something beginning with "c" which
>> would be consistent with what ":help cmdline-mode" states.
>>
>> Could someone explain why the observed behavior should have been expected?
>>
>> Thanks in advance for the education!
>>
>> --
>> --
>> You received this message from the "vim_use" maillist.
>> Do not top-post! Type your reply below the text you are replying to.
>> For more information, visit http://www.vim.org/maillist.php
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "vim_use" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to vim_use+unsubscribe@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/vim_use/v2vnpp%24i0q%241%40ciao.gmane.io
>> .
>>
>
> Vim stays in Command-line mode as long as user _is editing_ the command
> line. After enter key has been pressed Vim gets back into the Normal mode,
> as explained at `:help mode-switching` topic.
>
> Kind regards,
>
>>
>
Thanks for the explanation and link, it certainly explains what I'm
seeing. It just seemed odd that an ex-command is being executed in
"normal" mode. But, now that I think about it, autocommands do invoke
ex-commands and we do expect them to be aware of the current buffer's
mode setting.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/v3gfto%24qs4%241%40ciao.gmane.io.

Re: Vim in Windows Command Prompt only has 16 colors to work with

I had for a long time

if has("win32") && !has("gui_running")
    set t_Co=256
endif

in my configuration to make it 256 colors aware.
On Saturday, May 25, 2024 at 6:19:05 AM UTC+10 DwigtArmyOfChampions wrote:
If I launch vim from the Windows 10 cmd line and then run the command "echo &t_Co" it only returns 16. Is there any way to get at least 256 colors to display in a regular cmd window, if not full color?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/24050da4-4487-49f3-86dd-fa7370a23d83n%40googlegroups.com.