Skip to content

Commit 5599ed4

Browse files
committed
🔥 Remove g:repl
1 parent d607c31 commit 5599ed4

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,24 @@ REPLs. This project provides some wrapper scripts to use this plugin for them:
5353

5454
![nvimp](https://github.com/wakatime/prompt-style.lua/assets/32936898/8d0b4863-15c6-4966-b8af-219c9c40c1ae)
5555

56+
Tips: you can skip loading unnecessary plugins in your vimrc by:
57+
58+
```vim
59+
let s:l_flag = 0
60+
for arg in v:argv
61+
if s:l_flag == 1
62+
let g:script_name = fnamemodify(arg, ':t')
63+
break
64+
endif
65+
if arg ==# '-l'
66+
let s:l_flag = 1
67+
endif
68+
endfor
69+
if get(g:, 'script_name', '') ==# 'nvimp'
70+
finish
71+
endif
72+
```
73+
5674
![texluap](https://github.com/wakatime/prompt-style.lua/assets/32936898/96d9f4c1-55fc-4ae3-87b8-7afd29f4ba0e)
5775

5876
![pandocp](https://github.com/wakatime/prompt-style.lua/assets/32936898/b556effe-6be7-4cf9-b612-b1283d6de721)

bin/nvimp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env -S nvim --headless --cmd "let g:repl = 'nvimp'" -l
1+
#!/usr/bin/env -S nvim --headless -l
22
local string = require "string"
33
local package = require "package"
44
local version = string.gsub(_VERSION, ".* ", "")

0 commit comments

Comments
 (0)