Comments (15)
Also right now, I tried :/./
and hit Tab and got to a drive root C:/Documents and Settings
and so on. Please note that the project that was open was actually in drive E:/
. Maybe its something to do with the Windows file system, I'm not really sure. I haven't checked the same for Linux. Will update this thread once I do.
from advancednewfile.
No need for the /
. Entering :
will start it from the current directory. Enter something like :my_new_file
will create my_new_file
in the current working directory.
from advancednewfile.
I did that :file.txt
and it worked exactly like you said 😄 but I tried out :/./
just out of curiosity... Saw something weird... so I just thought of letting you know
from advancednewfile.
Great, I can look into that. Just wanted to make sure you knew how the :
worked since that was the original problem. If I had to guess, it's because I do some odd handling of a linux style absolute paths on windows systems.
from advancednewfile.
Relative paths will now be based on current working directory. It is a setting, but it's enabled by default. I tried :/./
and everything looked okay to me. Let me know if you still have issues.
from advancednewfile.
I cloned the repo... but I did not get any change in behavior... did not work on Linux... :/./file.ext
pointed to /file.ext
at least on the status bar... and no file was created... when I hit enter
from advancednewfile.
When I said relative paths, I meant when you enter something like ./foo/bar
into the input field. As for :/./file
I was referring to the Windows issue where you had a file in E:\
but it was showing C:\
. It falling to the root directory is expected, though should be fixed such that a /
should only bring you to the home directory if it's the first token. My guess is it didn't create the file because of a permissions issue.
from advancednewfile.
My bad... I misunderstood
:/./
Windows issue fixed... It now points to the correct drive 👍
Both ./
and ../
work. I can go up the folder tree... 😃
My guess is it didn't create the file because of a permissions issue.
Yup... permission issue...
from advancednewfile.
I pushed a fix that should take care of paths like :/./something
from advancednewfile.
That works too... Also I noticed something... Unsure whether its usual behavior or not, but just thought you should know
:./folder1/folder2/../file.ext
creates folder1
(in the current directory) containing bother folder2
and file.ext
. and opens file.ext
Also if someone stupidly (I am very curious) tried to do something like /folder:folder2
the error message they get in the console would be
error: Cannot create '/folder:folder2'. See console for details
[AdvancedNewFile] ERROR Exception: Access is denied '/'
But if they tried /folder:folder2/file.ext
the error message in the console would be
error: Cannot create '/folder:folder2/file.ext'. See console for details
[AdvancedNewFile] ERROR Exception: The directory name is invalid '/folder:folder2'
Shouldn't the first error message be something like The filename is invalid '/folder:folder2'
Again these are not really issues. But in the off chance that someone is stupid enough to try it, they should be provided with the proper response. Don't you feel so?
from advancednewfile.
I'll try to address the first issue soon. The second issue I knew about. Technically, the permission error is correct. A colon is a valid path character. Though if they are used, I'm pretty sure this plugin would have issues. That being said, the errors should be consistent.
from advancednewfile.
As long as you are aware of the above mentioned its fine... No one is going to try something stupid like what I did... At least no one with any sense... The colon is a valid name for a file? Its valid for paths like file:// right? Not for file names... I didn't know they were valid for paths... thanks for that info 😄
from advancednewfile.
Yup, do a touch or mkdir in your terminal. 😄 I didn't know either until I thought "I wonder if this will mess things up". Anyways, going to close this and open a few more issues just to keep things straight for myself. If you feel like being creative and testing any other odd cases, please do! Thanks for using the plugin and the feedback!
from advancednewfile.
Indeed a touch/mkdir does allow colon in the name of a file/folder. Who knew...
It was my pleasure 😄 testing your plugin. I shall continue to file issues when I come across them.
from advancednewfile.
':' at the beginning does not work as expected on Mac
from advancednewfile.
Related Issues (20)
- Feature: Create file identification generator HOT 3
- FileHeader is very slow HOT 1
- file_templates how to use HOT 2
- A lot of problems HOT 1
- Syntax highlighting after rename extension works only after file reopen HOT 7
- Suddenly Stopped Working on Sublime 3 HOT 5
- TypeError: super(type, obj): obj must be an instance or subtype of type HOT 3
- Trying to create a file via alias on a drive that's not mounted halts Sublime (Windows x32) HOT 1
- No warn option for copy overwrite HOT 1
- Can not get aliases working HOT 4
- AdvancedNewFile is not working. HOT 2
- Where can I find package file on my linux pc ? HOT 3
- Does not create file of folder on entering path in sublime text 3 build 3143 HOT 3
- can we disable opening file when right click at sidebar? HOT 2
- Can't work out how to replace default ctrl-S behaviour with the plugin's HOT 6
- :filename on samba/windows shares throws error (bug)
- folder_exclude_patterns ignored HOT 3
- Feature - Default Name while creating or renaming with current date/time HOT 2
- [feature] add create new folder at cwd HOT 12
- Remove options for whether to show warnings before overwriting existing files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advancednewfile.